# ComposerPrimitive URL: /docs/api-reference/primitives/composer Primitives for the text input, send button, and attachments. The user interface to add new messages or edit existing ones. **Dual Use!** A Composer placed directly inside a `Thread` will compose new messages. A Composer placed inside a `Message` will edit that message. Anatomy \[#anatomy] ```tsx import { ComposerPrimitive } from "@assistant-ui/react"; // creating a new message const Composer = () => ( ); // editing an existing message const EditComposer = () => ( ); // with voice input (dictation) const ComposerWithDictation = () => ( s.composer.dictation == null}> s.composer.dictation != null}> ); ``` API Reference \[#api-reference] Root \[#root] Contains all parts of the composer. This primitive renders a `
` element unless `asChild` is set. Input \[#input] The text input field for the user to type a new message. This primitive renders a `