> ## Documentation Index
> Fetch the complete documentation index at: https://www.text.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat widget

> APIs and tools for controlling, extending, and building on the chat widget.

Three ways to work with the chat widget: build your own with the Customer SDK, control the default one with JavaScript, or use a framework-specific wrapper.

## Customer SDK

**What it does:** Provides JavaScript methods for customer-side chat actions that run in the browser — starting a chat, sending messages, attaching customer data. It wraps the Customer Chat API, so you get those actions without needing to build a backend.

**When you'd use it:**

* Building a chat interface with your own design
* Reacting to real-time events — new messages, ratings, chat history — to drive your own UI logic

<Card title="Customer SDK" icon="window" href="/docs/sdk/customer-sdk/overview/introduction" horizontal>
  Browser-based methods for customer-side chat actions, built on the Customer
  Chat API.
</Card>

## Chat Widget JavaScript API

**What it does:** Controls the embedded chat widget from your site's JavaScript — showing, hiding, passing customer data, and reacting to widget events like new messages or submitted forms.

**When you'd use it:**

* Opening the widget with a pre-filled message from a link or button elsewhere on your site
* Reading the widget's or customer's current state before deciding how your page should behave
* Triggering custom sales-tracking events tied to a chat

<Card title="Chat Widget JavaScript API" icon="code" href="/docs/api/chat-widget-js-api/" horizontal>
  Control the embedded widget's behavior and data from your site's JavaScript.
</Card>

### Chat Widget Adapters

**What it does:** Wraps the Chat Widget JavaScript API in framework-specific components for React, Vue, and Angular, so you interact with the widget the way your framework already expects instead of wiring up imperative JavaScript API calls by hand.

**When you'd use it:**

* Keeping the widget in sync automatically when your own app's state changes
* Relying on the same mount, update, and unmount lifecycle model across React, Vue, and Angular

<Card title="Chat Widget Adapters" icon="puzzle-piece" href="/docs/api/chat-widget-adapters/overview" horizontal>
  Framework components for React, Vue, and Angular built on the Chat Widget
  JavaScript API.
</Card>
