Prompt Input
An input field that allows users to enter and submit text to an AI model.
Installation
Copy
Examples
With Actions
Use "PromptInputActions" to add actions with tooltips to the "PromptInput".
Props
PromptInput
| Name | Type | Default |
|---|---|---|
isLoading | boolean | false |
value | string | "" |
onValueChange | (value: string) => void | |
maxHeight | number | string | 240 |
onSubmit | () => void | |
children | Snippet | |
class | string | |
PromptInputTextarea
| Name | Type | Default |
|---|---|---|
disableAutosize | boolean | false |
onkeydown | (event: KeyboardEvent) => void | |
class | string | |
disabled | boolean | |
...props | HTMLTextareaAttributes | |
PromptInputActions
| Name | Type | Default |
|---|---|---|
children | Snippet | |
class | string | |
...props | HTMLAttributes<HTMLDivElement> | |
PromptInputAction
| Name | Type | Default |
|---|---|---|
tooltip | Snippet | |
children | Snippet | |
class | string | |
side | "top" | "bottom" | "left" | "right" | "top" |
...props | Partial<TooltipPrimitive.RootProps> | |