Chat Input

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

PropTypeDefaultDescription
value'string''null'A string that represents the raw value contained in the control.
onKeyDown'default' | 'ai''default'Keyboard event listener.
onChangeReact.ReactNodenullEvent handler function that fires when the input's value changes.
placeHolderstringnullDisplayed in a dimmed color when the text area value is empty.
classNamestringnullAdditional classes to apply to the chat bubble.