Chat composer preview
Write messages with attachments, keyboard shortcuts and send or stop controls.
pro · Blocks · composite
When to use
- Use it when a page needs write messages with attachments, keyboard shortcuts and send or stop controls.
- Choose it inside an authenticated product surface when the host application owns routing, persistence, and service calls.
Alternatives
- Choose empty-state instead when empty collections, search results and errors with a clear next action is the actual interface need, rather than chat composer.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/chat-composerImport components/ui/tidal.css, components/ui/chat-composer.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/chat-composer.css";
import{TidalChatComposer}from"./components/ui/chat-composer";
export default()=><div className="tidal-scope"><TidalChatComposer onSend={() => {}} onValueChange={() => {}} value={"value"}/></div>;API and props
TidalChatComposer.onSend (required)(value: string, event: FormEvent<HTMLFormElement>) => voidCallback invoked when the send interaction is proposed.
TidalChatComposer.onValueChange (required)(value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => voidCallback invoked when the value change interaction is proposed.
TidalChatComposer.value (required)stringRequired value value accepted by this exported component.
TidalChatComposer.attachmentTrayTidalAttachmentTrayProps | undefinedOptional attachment tray value accepted by this exported component.
TidalChatComposer.busyboolean | undefinedOptional busy value accepted by this exported component.
TidalChatComposer.canSendboolean | undefinedOptional can send value accepted by this exported component.
TidalChatComposer.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalChatComposer.errorstring | undefinedOptional error value accepted by this exported component.
TidalChatComposer.labelstring | undefinedOptional label value accepted by this exported component.
TidalChatComposer.labels{ send?: string; stop?: string; sending?: string; } | undefinedOptional labels value accepted by this exported component.
TidalChatComposer.onStopMouseEventHandler<HTMLButtonElement> | undefinedCallback invoked when the stop interaction is proposed.
TidalChatComposer.placeholderstring | undefinedOptional placeholder value accepted by this exported component.
TidalChatComposer.readOnlyboolean | undefinedOptional read only value accepted by this exported component.
TidalChatComposer.submitButtonPropsOmit<TidalButtonProps, "variant" | "loading" | "form" | "type" | "children"> | undefinedOptional submit button props value accepted by this exported component.
TidalChatComposer.submitButtonRefRef<HTMLButtonElement> | undefinedOptional submit button ref value accepted by this exported component.
TidalChatComposer.submitShortcut"none" | "enter" | "mod-enter" | undefinedOptional submit shortcut value accepted by this exported component.
TidalChatComposer.textareaPropsTextareaProps | undefinedOptional textarea props value accepted by this exported component.
TidalChatComposer.textareaRefRef<HTMLTextAreaElement> | undefinedOptional textarea ref value accepted by this exported component.
TidalChatComposer.toolsReactNodeOptional tools value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Install the declared registry dependencies and render inside a tidal-scope with the foundation stylesheet loaded.