ChatInput
The ChatInput component (chat-input.tsx
) is used as an text-area with predefined styling to fit well with the other components.
Installation
npx shadcn-chat-cli@latest add chat-input
Examples
With buttons
API Reference
ChatInput
Prop | Type | Default | Description |
---|---|---|---|
value | 'string' | 'null' | A string that represents the raw value contained in the control. |
onKeyDown | 'default' | 'ai' | 'default' | Keyboard event listener. |
onChange | React.ReactNode | null | Event handler function that fires when the input's value changes. |
placeHolder | string | null | Displayed in a dimmed color when the text area value is empty. |
className | string | null | Additional classes to apply to the chat bubble. |