Soenneker.Blazor.Chatwoot
4.0.980
Prefix Reserved
dotnet add package Soenneker.Blazor.Chatwoot --version 4.0.980
NuGet\Install-Package Soenneker.Blazor.Chatwoot -Version 4.0.980
<PackageReference Include="Soenneker.Blazor.Chatwoot" Version="4.0.980" />
<PackageVersion Include="Soenneker.Blazor.Chatwoot" Version="4.0.980" />
<PackageReference Include="Soenneker.Blazor.Chatwoot" />
paket add Soenneker.Blazor.Chatwoot --version 4.0.980
#r "nuget: Soenneker.Blazor.Chatwoot, 4.0.980"
#:package Soenneker.Blazor.Chatwoot@4.0.980
#addin nuget:?package=Soenneker.Blazor.Chatwoot&version=4.0.980
#tool nuget:?package=Soenneker.Blazor.Chatwoot&version=4.0.980
Soenneker.Blazor.Chatwoot
A Blazor component and scoped JavaScript interop service for the Chatwoot website widget.
Installation and registration
dotnet add package Soenneker.Blazor.Chatwoot
using Soenneker.Blazor.Chatwoot.Registrars;
builder.Services.AddChatwootInteropAsScoped();
Render the widget
@using Soenneker.Blazor.Chatwoot.Configuration
@using Soenneker.Blazor.Chatwoot.Dtos
<Chatwoot @ref="_chatwoot"
Configuration="_configuration"
OnReady="OnReady"
OnOpen="OnOpen"
OnClose="OnClose"
OnMessage="OnMessage"
OnError="OnError" />
@code {
private Chatwoot? _chatwoot;
private readonly ChatwootConfiguration _configuration = new()
{
WebsiteToken = "your-website-token",
BaseUrl = "https://app.chatwoot.com",
Locale = "en",
Position = "right",
DarkMode = "auto"
};
private Task OnReady() => Task.CompletedTask;
private Task OnOpen() => Task.CompletedTask;
private Task OnClose() => Task.CompletedTask;
private Task OnMessage(ChatwootMessage message) => Task.CompletedTask;
private Task OnError(JsonElement error) => Task.CompletedTask;
}
The component loads the SDK and creates the widget after its first render. BaseUrl must be absolute HTTPS; loopback HTTP is allowed for local development. Chatwoot's SDK is page-global, so render only one Chatwoot component at a time.
Control the widget
Use the component reference after OnReady has fired:
await _chatwoot!.Open();
await _chatwoot.Close();
await _chatwoot.Toggle();
await _chatwoot.SetUser("customer-42", new
{
name = "Ada Lovelace",
email = "ada@example.com",
identifier_hash = hashFromYourServer
});
await _chatwoot.SetCustomAttributes(new
{
plan = "enterprise",
region = "us-central"
});
The component also exposes SetUserAttributes, SetLabel, RemoveLabel, SetLocale, DeleteCustomAttribute, Reset, Shutdown, and PopoutChatWindow. Close hides the widget while retaining its session; Reset clears the Chatwoot session; Shutdown removes this wrapper's event handlers and resets the widget.
For authenticated visitors, enable Chatwoot identity validation and generate identifier_hash on a trusted server. Never place the HMAC secret in the Blazor application. Attribute values and chat content are sent to the configured Chatwoot instance, so apply the same consent and privacy controls used for other third-party customer-data tools.
If the application uses a Content Security Policy, allow the configured Chatwoot origin for its SDK, frames, images, and network connections. The component releases its callbacks and widget state when it is removed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Soenneker.Asyncs.Initializers (>= 4.0.102)
- Soenneker.Blazor.Extensions.EventCallback (>= 4.0.461)
- Soenneker.Blazor.Utils.ResourceLoader (>= 4.0.1756)
- Soenneker.Extensions.List (>= 4.0.992)
- Soenneker.Json.CollectionConverter (>= 4.0.852)
- Soenneker.Lepton.Suite (>= 4.0.87)
- Soenneker.Utils.Json (>= 4.0.2713)
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 |
|---|---|---|
| 4.0.980 | 113 | 9/16/2026 |
| 4.0.979 | 91 | 9/16/2026 |
| 4.0.978 | 78 | 9/16/2026 |
| 4.0.977 | 75 | 9/16/2026 |
| 4.0.975 | 78 | 9/16/2026 |
| 4.0.972 | 80 | 9/16/2026 |
| 4.0.970 | 78 | 9/15/2026 |
| 4.0.968 | 73 | 9/15/2026 |
| 4.0.967 | 79 | 9/15/2026 |
| 4.0.965 | 90 | 9/14/2026 |
| 4.0.964 | 88 | 9/14/2026 |
| 4.0.963 | 90 | 9/13/2026 |
| 4.0.962 | 94 | 9/13/2026 |
| 4.0.961 | 81 | 9/13/2026 |
| 4.0.960 | 93 | 9/13/2026 |
| 4.0.959 | 91 | 9/13/2026 |
| 4.0.958 | 86 | 9/13/2026 |
| 4.0.955 | 128 | 9/13/2026 |
| 4.0.954 | 81 | 9/13/2026 |
| 4.0.951 | 91 | 9/12/2026 |
Update dependency Soenneker.Utils.Json to 4.0.2710 (#2472)