Examples
Default
With Placeholder
With File Button
Full Feature
Disabled
Props
ChatInput
A chat-style multi-line input with an integrated toolbar containing an optional file-attach button, optional right-side controls (e.g. a model selector), and a submit button — all inside a single bordered container. Designed to behave like modern AI chat inputs: auto-grows with content, submits on Enter (Shift+Enter for newlines), and keeps controls inline.Replaces the built-in attachment strip entirely. When set to any value other than
undefined (including null or []), ChatInputProps.attachments is ignored.Image attachments shown in the built-in thumbnail strip. Ignored when
ChatInputProps.attachmentPreviews is provided (including null).Called when the user removes a built-in thumbnail. The remove button is disabled when this is omitted or the input is
ChatInputProps.disabled.Callback fired when the attach-file button is clicked. Only relevant when
showFileButton is true.Callback fired when the user submits (clicks the send button or presses Enter without Shift). Receives the current trimmed text value.
Title shown at the top of the
"sheet" variant of the built-in selector (e.g. “Switch AI Model”).Options for the built-in inline dropdown selector (e.g. model picker). Ignored when
toolbarRight is provided.Currently selected value for the built-in dropdown. Should match one of
selectOptions[].value.How the built-in selector presents its options:
"menu"(default) — a dropdown anchored to the trigger, for pointer/desktop."sheet"— a bottom sheet, for mobile/touch viewports.
selectVariant={isDesktop ? "menu" : "sheet"}.Optional content rendered in the bottom-right toolbar, to the left of the submit button. When provided, takes precedence over the built-in
selectOptions dropdown.Exported types
Also exported from@fanvue/ui: ChatInputAttachmentItem, ChatInputProps, ChatInputSelectOption.
Setup: Installation · Theming