Skip to contentSkip to navigationSkip to topbar
Paste assistant Assistant
Figma
Star

Chat Composer

Version 5.1.1GithubStorybookPeer review pending

A Chat Composer is an input made for users to type rich chat messages.

Installation

Installation page anchor
yarn add @twilio-paste/chat-composer - or - yarn add @twilio-paste/core
import {ChatComposer} from '@twilio-paste/core/chat-composer';

export const BasicChatComposer = () => (
  <ChatComposer
    config={{
      namespace: 'customer-chat',
      onError: (e) => {
        throw e;
      },
    }}
    ariaLabel="A basic chat composer"
    placeholder="Chat text"
  />
);

ChatComposer

ChatComposer page anchor

config

Utilize the Lexical API directly

Type
any
Default
null

disabled

Type
boolean
Default
null

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
CHAT_COMPOSER

initialValue

Type
string
Default
null

maxHeight

Type
any
Default
null

onChange

Type
any
Default
null