Composer: writing next to a record
Composer is the one box an app built on Meadowstack uses for writing next to a record or in a conversation, with the send button inside it. Cmd or Ctrl+Enter sends, the text stays in the box if sending fails, and what was sent appears in the record's history as a filled bubble.
By Bohuslav PoláčekChecked
What it is for
People ask about a record next to the record: "Is this the final quantity?", "I will send the change in Figma." In an app built on Meadowstack that box is always Composer: one rounded box with the send button inside, under the record's history, labelled by the Field around it. What was sent lands in the history as a filled bubble, so the question and the changes it is about read as one story.
The preview is the end of a task panel in the Brightpath example: two comments from the activity, then the box. On the left it is empty and shows its placeholder; on the right a reply is typed and the key cap for the shortcut appears beside the send button. The box grows with the text, up to ten lines, and then scrolls inside.
The manifest sets its range: writing next to a record or in a conversation, and the assistant's box with appearance="liquid". A form's field is an Input or Textarea in a Field, and a long post with formatting is RichTextEditor.
The rules and where they live
- Writing next to a record is Composer in a Field: the send button inside, Cmd/Ctrl+Enter sends, written text in AuditTimeline a filled bubble. The root
AGENTS.md, Look and feel. - Every input has a visible label.
AGENTS.md, Accessibility (WCAG 2.2 AA): theFieldgives the box its label, the placeholder only hints. - Shortcuts are chords, never a single character.
AGENTS.mdanddocs/principles.md(WCAG 2.1.4): sending is Cmd or Ctrl with Enter, so plain Enter is a new line in a comment. - One box to write in, mentions with @, files, Cmd/Ctrl+Enter or Enter in chat.
docs/patterns.md, Conversation, where the same box runs the chat, the comments and the inbox. - The composer is as wide as the messages.
docs/principles.md, Conversations: text keeps a reading measure, and the box lines up with it. - No own textarea in an app. The static guard
bare-controlinscripts/check-markup.mjsfails an app's owntextareaorbutton(docs/audit.md), which leads to the kit's box.
What AI coding tools write instead
The manifest names two: a textarea above a row of buttons and a hand-built chat input. The first puts a grey "Post comment" button under a bare textarea, often with no label but its placeholder. Enter sends half-written comments, or nothing sends from the keyboard at all. The text is cleared as the request leaves, so a failed send loses it. And the comments end up in a list of their own, apart from the record's history.
Composer keeps the text until onSend succeeds and shows a spinner in the button meanwhile; the demo's task panel adds a toast saying the comment could not be sent and the text is still in the box. Sending is a chord with a visible key cap, the Field brings the label, and the comment becomes an entry in AuditTimeline like any other change.
How to use it
| Prop | What it takes |
|---|---|
value, onValueChange | The text, controlled by you. |
onSend | Gets the text; the button spins until it settles, and the text stays if it throws. |
submitOn | "mod+enter" (the default, for comments) or "enter" (for a chat). |
mentions | The app's records to offer after @. |
sendLabel, allowEmpty, emptyAction | The button's name, sending without text, and what the empty box offers instead. |
leading, top | Slots before the text and above it, such as an attachment. |
layout, appearance | "inline" or "stacked"; "box" or "liquid" for the assistant. |
Wrap it in a Field with the label people see, and put it right under the record's history.
Its entry in the manifest
| Manifest field | Composer |
|---|---|
| What it is | One box for writing a comment, note or message, with the send button inside; Cmd/Ctrl+Enter sends. |
| Use it for | Writing next to a record or in a conversation; appearance="liquid" for the assistant. |
| Not for | For a form field (Input or Textarea in a Field); For a long post with formatting (RichTextEditor) |
| It replaces | A textarea above a row of buttons; A hand-built chat input |
| Screen types | Record; Inbox; Worklist; Workspace |
| Import | import { Composer } from "@meadowstack-studio/kit"; |
Where the example apps use it
| Example app | Modules that render it |
|---|---|
| An app for a packaging and print company | Jobs, Print file editor |
| An app for a studio or agency | Tasks |
| An app for a sports club | Front desk |
| An app for a construction company | Site diary, Drawings |
| An app for one person | Brand deals, Content, Training |
How the starter calls it
function CommentBox({ onSend }: { onSend: (text: string) => Promise<void> }) {
const [text, setText] = useState("");
return (
<Field label="Comment">
<Composer
value={text}
onValueChange={setText}
placeholder="A question or a note for the others"
onSend={async (value) => {
await onSend(value);
setText("");
}}
/>
</Field>Questions
Which shortcut sends a comment?
Cmd+Enter on a Mac and Ctrl+Enter elsewhere; the key cap appears beside the send button once there is text. A chat can send on Enter instead.
What happens to the text if sending fails?
It stays in the box. The send button shows a spinner until the request settles, the box clears only when it succeeds, and the demo adds a toast saying the text is still there.
Why is the send button inside the box?
So the box and its action read as one control and no row of buttons sits under the text. The history above it stays calm, and the same box works in a comment, a chat and the assistant.
Can people mention a record in a comment?
Yes. Pass the app's records as mentions, and typing @ offers them, so a comment links the site, order or task it talks about.
Two ways
Build it yourself, or have it built
Build it yourself
Build your app on the framework
Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.
One payment, lifetime updates
Get the frameworkHave it built
Have us build your app
Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.
After launch, Care keeps it improving, from €99 a month.
from €1,990
Describe your app