Composer
A focused prompt surface with growing input, composable actions, and submission state.
Installation
Copy the command below and run it in your terminal.
Usage
Bind the prompt value and handle submission on the root. The component awaits async handlers and shows its submitting state automatically.
By default, ↵ submits and ⇧↵ inserts a new line. Set submitOnEnter=false on Input when Enter should always create a new line.
Examples
Use explicit states when submission is managed outside the component.
Idle
Submitting
Error
Toolbar inset
The toolbar defaults to the frame chrome outside the input well. Set variant="inset" to merge it into the same inset surface as the input.
Anatomy
Composer.Root - Manages prompt submission.
Composer.Input - Accepts the prompt text.
Composer.Toolbar - Groups composer controls.
Composer.Actions - Groups composer actions.
Composer.Submit - Submits or stops the prompt.
bunx @sivir-ui/svelte add composer