Kits
ChatComposer
Message composer with controlled text, Enter or ⌘ Enter submit, caret text insertion, and trigger-menu support.
Composition
Anatomy
- <ChatComposer>
- <ChatComposerShell>
- <ChatComposerAccent />
- <ChatComposerTextarea />
- <ChatComposerToolbar>
- <ChatComposerTools />
- <ChatComposerSubmit />
- <ChatComposerFooter />
- <ChatComposerShell>
Installation
Use this command to install the component.
Usage
Dependencies
Behavior hook
src/registry/hooks/use-chat-composer.tsHookEditor motion (blur choreography)
src/registry/sources/control-ui/chat-composer-editor.cssSupportRich editor (ProseMirror)
src/registry/sources/control-ui/chat-composer-editor.tsxSupportMention extension
src/registry/sources/control-ui/chat-composer-editor/extensions/mention.tsxSupportExit-animation ghost
src/registry/sources/control-ui/chat-composer-editor/ghost.tsSupportEditor schema
src/registry/sources/control-ui/chat-composer-editor/schema.tsSupportSerialize
src/registry/sources/control-ui/chat-composer-editor/serialize.tsSupportExtension contract
src/registry/sources/control-ui/chat-composer-editor/types.tsSupportMotion
Buttonsrc/registry/lib/motion.tsUtilbuttonPrimitiveChatMessagechat-messageComponentLive statuslive-statusPrimitiveSpinnerspinnerPrimitiveTrigger Menutrigger-menuPrimitiveRaw code
Installed component source and support files
Available extensions
Optional, separately installed items this surface can host — not part of the component’s bundle.
SendAuroraAnchored
Anchored ChatComposer extension: a blurred aurora backdrop that sweeps up once per sent message — activated from skin.config via the chat-composer:send-layer anchor.
Knobs
Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.
--cui-chat-composer-* · 15 knobsHow the cascade resolves--cui-chat-composer-root-background<color>transparent--cui-chat-composer-shell-radius<length-percentage>var(--radius-composer)--cui-chat-composer-shell-background<color>var(--card)--cui-chat-composer-shell-background-image*none--cui-chat-composer-shell-backdrop-filter*none--cui-chat-composer-shell-border-color<color>var(--border)--cui-chat-composer-shell-border-width<length>var(--control-rim-width)--cui-chat-composer-shell-shadow*var(--shadow-md)--cui-chat-composer-input-foreground<color>var(--card-foreground)--cui-chat-composer-input-placeholder-foreground<color>var(--muted-foreground)--cui-chat-composer-mention-background<color>oklch(from var(--primary) l c h / 0.1)--cui-chat-composer-mention-radius<length-percentage>var(--radius-popup-item)--cui-chat-composer-mention-icon-radius<length-percentage>min(var(--radius-sm), calc(var(--spacing) * 1))--cui-chat-composer-mention-border-color<color>transparent--cui-chat-composer-mention-border-width<length>0px