Component libraryChat composer
Components/Blocks

Chat composer

Pro

Write messages with attachments, keyboard shortcuts and send or stop controls.

npx shadcn@latest add @tidal-pro/chat-composer
Desktop viewport

Installation

Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.

Terminal
npx shadcn@latest add @tidal-pro/chat-composer

Import components/ui/tidal.css, components/ui/chat-composer.css, components/ui/textarea.css, components/ui/attachment-tray.css, components/ui/status-badge.css, components/ui/progress.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.

Usage

Complete example source · Dependency and asset manifest

Loading the complete example…

API & behavior

Controlled value/onValueChange, required onSend; native form submit is prevented. Optional busy/onStop, disabled/readOnly/canSend, label/placeholder/error, submitShortcut (mod-enter default, enter, none), textareaProps/ref, submitButtonProps/ref, tools, attachmentTray, labels and native form attributes/ref. Native handlers run before higher callbacks and can prevent them. Keyboard shortcuts ignore IME composition and Alt-modified input, use native requestSubmit and retain validation; Shift-Enter remains a newline. The one persistent button becomes Stop when busy and a stop callback exists, preserving focus. Busy without onStop exposes a disabled sending indicator. The attachment slot composes TidalAttachmentTray; disabled makes tools inert and owned attachment actions disabled. Consumers own message values, file state, sends/stops, requests and persistence.

Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.

Building with an agent?Give it the installation guide and component catalog.