Soenneker.Blazor.Chatwoot
3.0.93
Prefix Reserved
dotnet add package Soenneker.Blazor.Chatwoot --version 3.0.93
NuGet\Install-Package Soenneker.Blazor.Chatwoot -Version 3.0.93
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blazor.Chatwoot" Version="3.0.93" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.Chatwoot" Version="3.0.93" />
<PackageReference Include="Soenneker.Blazor.Chatwoot" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Blazor.Chatwoot --version 3.0.93
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Blazor.Chatwoot, 3.0.93"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Soenneker.Blazor.Chatwoot&version=3.0.93
#tool nuget:?package=Soenneker.Blazor.Chatwoot&version=3.0.93
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Blazor.Chatwoot
A Blazor interop library for Chatwoot, the open-source customer engagement suite.
โจ Features
- ๐ฆ Lightweight Blazor component wrapper for the Chatwoot JS SDK
- ๐ Full .NET interop with JavaScript events
- ๐ก Supports event callbacks like
OnOpen
,OnMessage
, andOnError
- โ๏ธ Clean integration using dependency injection
- ๐งช Supports unit testing with
IChatwoot
abstraction
๐ฆ Installation
dotnet add package Soenneker.Blazor.Chatwoot
Register the interop in DI:
public static async Task Main(string[] args)
{
builder.Services.AddChatwootInteropAsScoped();
}
๐ Usage
๐งฉ Add to a Razor component
<Chatwoot Configuration="_config"
OnOpen="HandleOpen"
OnClose="HandleClose"
OnReady="HandleReady"
OnMessage="HandleMessage"
OnError="HandleError" />
๐ง Component code-behind
@code {
private readonly ChatwootConfiguration _config = new()
{
WebsiteToken = "replace-with-your-token",
BaseUrl = "https://app.chatwoot.com"
};
private Task HandleReady() => ConsoleLog("Chatwoot is ready!");
private Task HandleOpen() => ConsoleLog("Chat opened");
private Task HandleClose() => ConsoleLog("Chat closed");
private Task HandleMessage(ChatwootMessage message)
{
Console.WriteLine($"Message from Chatwoot: {message.Content}");
return Task.CompletedTask;
}
private Task HandleError(JsonElement error)
{
Console.WriteLine($"Chatwoot error: {error}");
return Task.CompletedTask;
}
private Task ConsoleLog(string msg)
{
Console.WriteLine(msg);
return Task.CompletedTask;
}
}
โ๏ธ Configuration
You must supply a ChatwootConfiguration
object to the component:
var config = new ChatwootConfiguration
{
WebsiteToken = "your-token", // Required
BaseUrl = "https://app.chatwoot.com", // Optional, defaults to this
Locale = "en", // Optional, default is "en"
HideMessageBubble = false,
ShowUnreadMessagesDialog = false,
Position = "right", // "left" or "right"
UseBrowserLanguage = false,
Type = "standard", // or "expanded_bubble"
DarkMode = "auto", // "light" or "auto"
BaseDomain = null // Optional, for cross-subdomain tracking
};
๐ API
This library provides a full interface via IChatwoot
, including:
SetUser(...)
SetLabel(...)
Shutdown()
Toggle()
SetLocale(...)
SetCustomAttributes(...)
- ... and more!
๐ฌ Chatwoot Events
The following Chatwoot events are exposed as Blazor EventCallback
s:
Chatwoot Event | .NET Callback |
---|---|
chatwoot:ready |
OnReady |
chatwoot:open |
OnOpen |
chatwoot:close |
OnClose |
chatwoot:on-message |
OnMessage(ChatwootMessage) |
chatwoot:error |
OnError(JsonElement) |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Intellenum (>= 1.0.6)
- Microsoft.AspNetCore.Components.Web (>= 9.0.4)
- Soenneker.Blazor.Extensions.EventCallback (>= 3.0.408)
- Soenneker.Blazor.Utils.ResourceLoader (>= 3.0.1437)
- Soenneker.Extensions.List (>= 3.0.914)
- Soenneker.Json.CollectionConverter (>= 3.0.724)
- Soenneker.Utils.Json (>= 3.0.2309)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.93 | 162 | 4/9/2025 |
3.0.92 | 134 | 4/9/2025 |
3.0.91 | 141 | 4/9/2025 |
3.0.90 | 140 | 4/9/2025 |
3.0.89 | 138 | 4/9/2025 |
3.0.88 | 137 | 4/9/2025 |
3.0.87 | 146 | 4/8/2025 |
3.0.86 | 139 | 4/8/2025 |
3.0.85 | 142 | 4/8/2025 |
3.0.84 | 138 | 4/8/2025 |
3.0.83 | 135 | 4/8/2025 |
3.0.82 | 131 | 4/8/2025 |
3.0.81 | 135 | 4/8/2025 |
3.0.80 | 138 | 4/8/2025 |
3.0.79 | 142 | 4/8/2025 |
3.0.78 | 141 | 4/8/2025 |
3.0.77 | 150 | 4/8/2025 |
3.0.76 | 138 | 4/8/2025 |
3.0.75 | 142 | 4/8/2025 |
3.0.74 | 143 | 4/8/2025 |
3.0.73 | 144 | 4/8/2025 |
3.0.72 | 142 | 4/8/2025 |
3.0.71 | 150 | 4/8/2025 |
3.0.70 | 143 | 4/8/2025 |
3.0.69 | 135 | 4/8/2025 |
3.0.68 | 142 | 4/8/2025 |
3.0.67 | 148 | 4/8/2025 |
3.0.66 | 139 | 4/8/2025 |
3.0.65 | 136 | 4/8/2025 |
3.0.64 | 145 | 4/8/2025 |
3.0.63 | 140 | 4/8/2025 |
3.0.62 | 145 | 4/8/2025 |
3.0.61 | 147 | 4/8/2025 |
3.0.60 | 139 | 4/8/2025 |
3.0.59 | 142 | 4/8/2025 |
3.0.58 | 139 | 4/8/2025 |
3.0.57 | 139 | 4/8/2025 |
3.0.56 | 142 | 4/8/2025 |
3.0.55 | 142 | 4/8/2025 |
3.0.54 | 146 | 4/8/2025 |
3.0.53 | 140 | 4/8/2025 |
3.0.52 | 143 | 4/8/2025 |
3.0.51 | 141 | 4/8/2025 |
3.0.50 | 148 | 4/8/2025 |
3.0.49 | 142 | 4/8/2025 |
3.0.48 | 145 | 4/8/2025 |
3.0.47 | 145 | 4/8/2025 |
3.0.46 | 144 | 4/7/2025 |
3.0.45 | 145 | 4/7/2025 |
3.0.44 | 141 | 4/7/2025 |
3.0.43 | 143 | 4/7/2025 |
3.0.42 | 147 | 4/7/2025 |
3.0.41 | 142 | 4/7/2025 |
3.0.40 | 144 | 4/7/2025 |
3.0.39 | 144 | 4/7/2025 |
3.0.38 | 142 | 4/7/2025 |
3.0.37 | 142 | 4/7/2025 |
3.0.36 | 140 | 4/7/2025 |
3.0.35 | 137 | 4/7/2025 |
3.0.34 | 136 | 4/7/2025 |
3.0.33 | 142 | 4/7/2025 |
3.0.32 | 140 | 4/7/2025 |
3.0.31 | 142 | 4/7/2025 |
3.0.30 | 136 | 4/7/2025 |
3.0.29 | 140 | 4/7/2025 |
3.0.28 | 139 | 4/7/2025 |
3.0.27 | 138 | 4/7/2025 |
3.0.26 | 133 | 4/7/2025 |
3.0.25 | 154 | 4/7/2025 |
3.0.24 | 143 | 4/7/2025 |
3.0.23 | 149 | 4/7/2025 |
3.0.22 | 141 | 4/7/2025 |
3.0.21 | 145 | 4/7/2025 |
3.0.20 | 148 | 4/7/2025 |
3.0.19 | 144 | 4/7/2025 |
3.0.18 | 148 | 4/7/2025 |
3.0.17 | 151 | 4/7/2025 |
3.0.16 | 149 | 4/7/2025 |
3.0.15 | 143 | 4/7/2025 |
3.0.14 | 142 | 4/7/2025 |
3.0.13 | 147 | 4/7/2025 |
3.0.12 | 143 | 4/7/2025 |
3.0.11 | 144 | 4/7/2025 |
3.0.10 | 152 | 4/7/2025 |
3.0.9 | 146 | 4/7/2025 |
3.0.8 | 144 | 4/7/2025 |
3.0.7 | 143 | 4/7/2025 |
3.0.6 | 148 | 4/7/2025 |
3.0.5 | 147 | 4/7/2025 |
3.0.4 | 142 | 4/7/2025 |
3.0.3 | 150 | 4/7/2025 |
3.0.2 | 147 | 4/7/2025 |
3.0.1 | 144 | 4/7/2025 |