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"
/>
);
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
Inherited props
Paste components will often extend native HTML elements and as a result will inherit or extend their available properties. Below is a list of the props this component has inherited and are also available to use.