Soenneker.Blazor.Chatwoot 3.0.165

Prefix Reserved
dotnet add package Soenneker.Blazor.Chatwoot --version 3.0.165
                    
NuGet\Install-Package Soenneker.Blazor.Chatwoot -Version 3.0.165
                    
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.165" />
                    
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.165" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blazor.Chatwoot" />
                    
Project file
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.165
                    
#r "nuget: Soenneker.Blazor.Chatwoot, 3.0.165"
                    
#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.165
                    
Install Soenneker.Blazor.Chatwoot as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.Chatwoot&version=3.0.165
                    
Install Soenneker.Blazor.Chatwoot as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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, and OnError
  • โš™๏ธ 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 EventCallbacks:

Chatwoot Event .NET Callback
chatwoot:ready OnReady
chatwoot:open OnOpen
chatwoot:close OnClose
chatwoot:on-message OnMessage(ChatwootMessage)
chatwoot:error OnError(JsonElement)
Product 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.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.165 58 5/28/2025
3.0.164 54 5/28/2025
3.0.163 51 5/28/2025
3.0.162 51 5/27/2025
3.0.161 48 5/27/2025
3.0.160 49 5/27/2025
3.0.159 50 5/27/2025
3.0.158 49 5/27/2025
3.0.157 52 5/27/2025
3.0.156 49 5/27/2025
3.0.155 52 5/27/2025
3.0.154 55 5/27/2025
3.0.153 57 5/25/2025
3.0.152 93 5/23/2025
3.0.151 101 5/23/2025
3.0.150 101 5/23/2025
3.0.149 108 5/23/2025
3.0.148 108 5/23/2025
3.0.147 104 5/23/2025
3.0.146 111 5/23/2025
3.0.145 110 5/23/2025
3.0.144 131 5/22/2025
3.0.143 122 5/22/2025
3.0.142 122 5/22/2025
3.0.141 149 5/21/2025
3.0.140 134 5/19/2025
3.0.139 127 5/18/2025
3.0.138 80 5/18/2025
3.0.137 217 5/14/2025
3.0.136 229 5/14/2025
3.0.135 209 5/14/2025
3.0.134 210 5/14/2025
3.0.133 204 5/14/2025
3.0.132 213 5/14/2025
3.0.131 205 5/14/2025
3.0.130 207 5/13/2025
3.0.129 169 5/8/2025
3.0.128 128 5/8/2025
3.0.127 127 5/8/2025
3.0.126 126 5/8/2025
3.0.125 127 5/8/2025
3.0.124 127 5/8/2025
3.0.123 129 5/8/2025
3.0.122 129 5/8/2025
3.0.121 128 5/8/2025
3.0.120 125 5/8/2025
3.0.119 130 5/7/2025
3.0.118 127 5/7/2025
3.0.117 127 5/7/2025
3.0.116 138 5/6/2025
3.0.115 127 5/5/2025
3.0.114 126 5/5/2025
3.0.113 129 5/5/2025
3.0.112 125 5/5/2025
3.0.111 125 5/5/2025
3.0.110 131 5/5/2025
3.0.109 124 5/5/2025
3.0.108 128 5/5/2025
3.0.107 125 5/5/2025
3.0.106 126 5/5/2025
3.0.105 129 5/5/2025
3.0.104 127 5/5/2025
3.0.103 125 5/5/2025
3.0.102 123 5/5/2025
3.0.101 129 5/5/2025
3.0.99 125 5/5/2025
3.0.98 126 5/5/2025
3.0.97 126 5/5/2025
3.0.96 126 5/5/2025
3.0.95 128 4/27/2025
3.0.94 65 4/26/2025
3.0.93 170 4/9/2025
3.0.92 138 4/9/2025
3.0.91 147 4/9/2025
3.0.90 145 4/9/2025
3.0.89 143 4/9/2025
3.0.88 142 4/9/2025
3.0.87 150 4/8/2025
3.0.86 148 4/8/2025
3.0.85 146 4/8/2025
3.0.84 143 4/8/2025
3.0.83 139 4/8/2025
3.0.82 135 4/8/2025
3.0.81 139 4/8/2025
3.0.80 142 4/8/2025
3.0.79 148 4/8/2025
3.0.78 147 4/8/2025
3.0.77 154 4/8/2025
3.0.76 145 4/8/2025
3.0.75 148 4/8/2025
3.0.74 149 4/8/2025
3.0.73 150 4/8/2025
3.0.72 146 4/8/2025
3.0.71 154 4/8/2025
3.0.70 148 4/8/2025
3.0.69 140 4/8/2025
3.0.68 147 4/8/2025
3.0.67 152 4/8/2025
3.0.66 144 4/8/2025
3.0.65 141 4/8/2025
3.0.64 150 4/8/2025
3.0.63 146 4/8/2025
3.0.62 150 4/8/2025
3.0.61 151 4/8/2025
3.0.60 144 4/8/2025
3.0.59 147 4/8/2025
3.0.58 144 4/8/2025
3.0.57 146 4/8/2025
3.0.56 147 4/8/2025
3.0.55 147 4/8/2025
3.0.54 152 4/8/2025
3.0.53 146 4/8/2025
3.0.52 155 4/8/2025
3.0.51 146 4/8/2025
3.0.50 152 4/8/2025
3.0.49 147 4/8/2025
3.0.48 150 4/8/2025
3.0.47 149 4/8/2025
3.0.46 150 4/7/2025
3.0.45 150 4/7/2025
3.0.44 146 4/7/2025
3.0.43 148 4/7/2025
3.0.42 152 4/7/2025
3.0.41 146 4/7/2025
3.0.40 148 4/7/2025
3.0.39 148 4/7/2025
3.0.38 146 4/7/2025
3.0.37 146 4/7/2025
3.0.36 144 4/7/2025
3.0.35 141 4/7/2025
3.0.34 141 4/7/2025
3.0.33 146 4/7/2025
3.0.32 145 4/7/2025
3.0.31 146 4/7/2025
3.0.30 140 4/7/2025
3.0.29 144 4/7/2025
3.0.28 144 4/7/2025
3.0.27 143 4/7/2025
3.0.26 139 4/7/2025
3.0.25 159 4/7/2025
3.0.24 148 4/7/2025
3.0.23 155 4/7/2025
3.0.22 147 4/7/2025
3.0.21 153 4/7/2025
3.0.20 154 4/7/2025
3.0.19 150 4/7/2025
3.0.18 154 4/7/2025
3.0.17 156 4/7/2025
3.0.16 154 4/7/2025
3.0.15 149 4/7/2025
3.0.14 153 4/7/2025
3.0.13 152 4/7/2025
3.0.12 148 4/7/2025
3.0.11 149 4/7/2025
3.0.10 157 4/7/2025
3.0.9 152 4/7/2025
3.0.8 149 4/7/2025
3.0.7 149 4/7/2025
3.0.6 154 4/7/2025
3.0.5 152 4/7/2025
3.0.4 146 4/7/2025
3.0.3 153 4/7/2025
3.0.2 151 4/7/2025
3.0.1 153 4/7/2025