The ChatInput component provides a standard chat text box with a send button. It handles pressing Enter to submit the message and disables state automatically during loading or when AI support is missing.
| Prop | Type | Description | Default |
|---|---|---|---|
value | string | The current text value of the input. | (Required) |
onChange | (val: string) => void | Callback function fired when the text changes. | (Required) |
onSubmit | () => void | Callback function fired when the form is submitted (button click or Enter). | (Required) |
isLoading | boolean | If true, disables input and swaps the send icon for a loading spinner. | false |
isSupported | boolean | If false, disables the input, indicating that AI is not supported/active. | false |
placeholder | string | Placeholder text for the input box. | "Type your message..." |