Skip to content

Components

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

Brightpath's task BRI-106 in the demo: the last two comments of its activity and the comment box, empty; right, a reply typed in, which brings the key cap beside the send button. The reply is an example.

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): the Field gives the box its label, the placeholder only hints.
  • Shortcuts are chords, never a single character. AGENTS.md and docs/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-control in scripts/check-markup.mjs fails an app's own textarea or button (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

Wrap it in a Field with the label people see, and put it right under the record's history.

Its entry in the manifest

The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

Where the example apps use it

The example apps and modules that render Composer, read from the demo's code when the site builds.Read from the demo's source when the site was built: 5 of 9 example apps render <Composer>, in the modules named here as each app's sidebar names them.

How the starter calls it

templates/starter/src/modules/requests/components/request-record.tsx
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>
The comment box under a purchase request's history: a Field with a visible label, and the text cleared only after onSend succeeds.

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 framework
  • Have 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