# ComposerPrimitive URL: /docs/api-reference/primitives/composer Primitives for the text input, send button, and attachments. *** title: ComposerPrimitive description: Primitives for the text input, send button, and attachments. ------------------------------------------------------------------------- The user interface to add new messages or edit existing ones. import { ParametersTable } from "@/components/docs/tables/ParametersTable"; import { KeyboardTable } from "@/components/docs/tables/KeyboardTable"; import { Code } from "@radix-ui/themes"; **Dual Use!** A Composer placed directly inside a `Thread` will compose new messages. A Composer placed inside a `Message` will edit that message. ## 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 = () => ( ); ``` ## API Reference ### Root Containts all parts of the composer. This primitive renders a `
` element unless `asChild` is set. ### Input The text input field for the user to type a new message. This primitive renders a `