# Composer 1 – Prompt input with attachments, model and dictation

> The prompt input, and the hardest part of a chat to get right. Files arrive by picker, drag or paste, each reporting its own upload state; a menu switches tools and connectors on for the turn; the model picker carries reasoning effort with it; and dictation swaps the field for a live waveform without shifting the layout. The unsent draft survives leaving and coming back. Speaks the AI SDK's message shape, and drops into a chat you already have.

A paid shadcn/ui block sold by the [@shadcncraft](https://shadcncraft.com/?utm_source=shadcn.exchange) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcncraft/composer-1).

- Page, with a preview: https://shadcn.exchange/r/shadcncraft/composer-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcncraft/composer-1-light-9e8118e19ec50b22.png
- Categories: chat
- Listed: 2026-10-13

## Buy and install

@shadcncraft sells this block, and its code is not on shadcn.exchange. Buy it from the registry, which installs it for those who have: https://shadcn.exchange/out/shadcncraft/composer-1

## Dependencies

- npm packages: `ai`, `sonner`
- Registry items: `attachment`, `dropdown-menu`, `input-group`, `spinner`, `switch`, `tooltip`

## Notes from the registry

`onSubmit` is the seam: it hands you the text and the files, and nothing else. What the model picker, the tool switches and the connectors are set to is a preference rather than part of the message, so it is held in `localStorage` and survives a reload without passing through your submit handler. Drafts are kept the same way, one per `draftKey`. Dictation runs on the browser's own Web Speech API, which asks for the microphone on first use. The button stays visible where that API is missing, since support cannot be read before the first attempt: pressing it reports the refusal through `onError`, which this block sends to a toast.
