Skip to main content
Signature

Import

To ensure optimal bundle sizes, see Optimize build size.
Vue

About this widget

The ais-chat-trigger widget renders a button that opens and closes the ais-chat widget. By default, the button floats in the bottom-right corner of the viewport. Add ais-chat-trigger when using the overlay or side-panel layout. The inline layout doesn’t need a trigger. See also: Agent Studio

Examples

Vue

Props

boolean
default:true
By default, the trigger is a floating button. Set floating to false to render an inline button that flows with surrounding content.
Vue
object | (props: { isOpen: boolean }) => VNode
A Vue component or render function to replace the default icon. It receives an isOpen Boolean prop so it can show different icons when the chat opens or closes.
Vue
object
default:"{}"
The CSS classes you can override:
  • ais-ChatToggleButton. The widget’s root element (the button).
Vue
object
A dictionary of translations to customize the button’s accessible label, which screen readers announce.
  • openLabel (string). The accessible label when the chat isn’t open. The default is Open chat.
  • closeLabel (string). The accessible label when the chat is open. The default is Close chat.
Vue

Events

() => void
The widget emits a click event after opening or closing the chat.
Vue

HTML output

HTML
When the chat is open, the button also gets the ais-ChatToggleButton--open class, and its aria-label becomes Close chat.
Last modified on October 28, 2026