Raft Design System

Components · Agents

MessageActionCard

A card an agent attaches to its message with an action already filled in, for a person to confirm; afterwards it records who did it and when.

StableAlso called ActionCard, action card, approval card
import { MessageActionCard } from "@botiverse/raft-ui";

An action card is how an agent asks for something it may not do alone: create a channel, add people, merge, publish, spend money. The agent fills in the action and attaches the card to its message; a person confirms it. Afterwards the card stays in the conversation as the record of who did it and when. A request waiting for someone is also listed in Activity (Hand-offs and approvals).

message-action-card/compositions/action-card-interactive

When to use

SituationUse
An agent wants to do something a person must authorizeMessageActionCard
An agent reports that it finishedIts message, with links to its proof (MessageItem)
An agent claimed or handed off workAn event line (SystemMessage)
Raft tells a person about something done for them that they can still take back, such as a message their assistant sent as themMessageActionCard on its own in the timeline, without a message around it (Sent by an assistant)
The person must decide now, outside a conversationDialog

Anatomy

  • MessageActionCard: the card, inside the body of the agent's message: an item card, at most 400px wide and the message's width on a phone (Cards in messages). Required.
  • MessageActionCardHeader: the top row. Required.
    • MessageActionCardHeaderIcon: the kind of action, in a neutral tile like an sm IconTile.
    • MessageActionCardHeaderTitle: what will be done. MessageActionCardHeaderDescription under it says what happened, or why the person can't act. It takes only a HelperText (helperText(content, { why, about }), rendered with data-why and data-about): who acted is audience, "Nothing was changed" is consequence, "Join this channel to act" is recovery (Writing › Helper text).
    • MessageActionCardHeaderMeta: the time the card records, in Space Mono at the hint tier. At the end of the description, inside its HelperText's content, it closes that line ("Approved by Martin · 10:51"); directly in the title, alone, it is a line of its own under the title. It stays in view while the card is folded.
    • MessageActionCardStatus: where the card stands, as a pixel and a word: what it waits for (Waiting, Members changing) or how it ended (Done). Whom it waits on is not in the header but in the action row (Waiting on someone).
    • MessageActionCardCollapseTrigger: folds the card to its header and back.
  • MessageActionCardContent: everything under the header; it folds.
    • MessageActionCardNotice: a standing note from Raft about consequences or permissions. At most one.
    • MessageActionCardProperties, MessageActionCardProperty, MessageActionCardPropertyLabel, MessageActionCardPropertyValue: the values the person checks, as a description list (DescriptionList): the label beside its value, and above it only when a value doesn't fit beside its label, at any width, as in a DescriptionList (Labels go above only when a value doesn't fit).
    • MessageActionCardHintLabel, MessageActionCardHint: the agent's own note, such as its reason or what it filled in. MessageActionCardHint takes only a HelperText (helperText(content, { why, about }), rendered with data-why and data-about).
    • MessageActionCardScopeList, MessageActionCardScopeListLabel, MessageActionCardScopeListViewport, MessageActionCardScope, MessageActionCardScopeName, MessageActionCardScopeDescription: the permissions an app asks for. MessageActionCardScopeDescription takes only a HelperText (helperText(content, { why, about }), rendered with data-why and data-about): what the permission lets the app see or do is audience.
    • MessageActionCardActions: the buttons, with MessageActionCardActionsNote (a HelperText (helperText(content, { why, about }), rendered with data-why and data-about)) before them, on a line of its own above them: beside two buttons in a 400px card a note had about 150px and pushed the confirm button onto a line of its own. For a person who can't act, the row holds only the note, which says whom the card waits on (Waiting on someone).
    • MessageActionCardCompletion: the record of who did it and when.
message-action-card/compositions/channel-agent-actions
message-action-card/compositions/integration-actions

Waiting on someone

A person who can't act on the card sees no buttons, so the action row is where it says who can: MessageActionCardActions with only a MessageActionCardActionsNote, "Waiting on Martin to answer" (helperText(..., { why: "audience", about: "request" })), and the header's status is the one neutral word Waiting (MessageActionCardStatus variant="muted"). The name is the person's display name in full, a MessageReferenceText variant="secondary" that opens the person, as names do everywhere else; a role (Waiting on an admin to answer) is plain text. Every card says "to answer", a confirmation as much as a question: to the reader, each is waiting on that person's reply, and one verb keeps each kind of card from finding its own. The note starts at the content's start edge and wraps around a long name; the row keeps no room for buttons. The person the card waits on sees the buttons and no status.

Whom it waits on is not in the status: in a 390px card the status takes the width it needs, and a long name there left the title about 92px wide. In the action row, empty for this reader, the name has the card's width and the title keeps its own (#proj-raft-ui:#338, 2026-11-30).

message-action-card/compositions/waiting-on-someone

States

StateThe card
Waiting on youOpen, with its buttons, and no status
Waiting on someoneOpen, with no buttons. The neutral status says Waiting; the action row says whom it waits on: Waiting on Martin to answer, so the title keeps its width (Waiting on someone)
Members changingOpen; its buttons stay, disabled, until a channel's members settle
Needs confirming againOpen, warning; something changed in who will see it, the note says what, and one button says Confirm
DoneFolded to its header, lime; the description says who did it and when
Denied, DeclinedFolded, neutral; the description says who decided and when, and for Declined that nothing changed
Expired, WithdrawnFolded, neutral; the description says when, and who withdrew it
FailedOpen or folded as its kind sets, orange; what failed and the next step
UnavailableFolded, warning; what it depends on is not available now

Each state's words, tone and record line are in Cards in messages. There is no View only: a card the person can't act on stays open and says whom it waits on, in its action row.

  • When the action fails, show a toast and leave the card as it was, so the person can try again (Toast).
message-action-card/compositions/resolution-states

Behavior

  • The card is open by default. Fold a settled card with defaultOpen={false}; a card waiting on someone else stays open; the collapse trigger opens it again.
  • A long list of permissions scrolls inside its own area, at most 136px tall, so the card doesn't grow with it. The cap cuts through a line of text, so the cut reads as more below: through the third permission's name when the descriptions take one line, through the last line of the second when they take two. A cap that ends between two rows, or under the last pixels of a line, reads as the end of the list.

Content

  • Title the card with a verb and its object, in sentence case: Create channel #launch-week, Merge #26 into main.
  • Name people and agents by display name, without @: Approve Linear for Lumen, Created by Ada → Release Bot. The @ handle is for mentions, which notify; a card that names someone notifies no one, and a display name is what the person sees everywhere else (#proj-apps:#41, 2026-11-06).
  • Make the confirm button repeat the verb and the object of the title, in sentence case: Create channel. Unlike a dialog's button, it keeps the object, because it appears away from a dialog title and has to say on its own which action it approves (Writing).
  • List only the properties the person needs to check.
  • When the agent filled values in itself, say so in the hint: "Bugen filled these in from the thread. You can change them before it's created."
  • Record the result with the person and the time: Approved by Martin · 10:51. Put the time in MessageActionCardHeaderMeta, not as text of the description: it is data, a note like a message's time (Color tiers), and the description is for the words.

Accessibility

MessageActionCard wraps Base UI's Collapsible: the collapse trigger and the folding content follow it.

  • Give MessageActionCardCollapseTrigger an aria-label ("Show or hide details"); it shows only an icon.
  • Give MessageActionCardScopeListViewport an aria-label that names the list ("Permissions"). It is a Tab stop only while it overflows, so keyboard users can scroll it.
  • The header icon is hidden from assistive technology; the title carries the meaning.

Rules

  • Make the confirm button the small ink-bordered button (Button at the default size="md"), not pink: the screen's one pink button is the composer's send button.
  • Put a ghost Edit first button beside it, which opens the ordinary dialog for the action with the agent's values filled in. Don't edit fields on the card: the card is a summary.
  • Run the action as the person who confirmed it.
  • Keep the card in the conversation after it is resolved, as the record of the action.
  • Show no buttons to someone without the permission to act. Say whom the card waits on instead, in the action row, and keep the header's status to Waiting.
  • Keep a notice neutral, never in a warning color.

API

MessageActionCard

The card is a disclosure: open by default, and a consumer can fold a resolved or view-only card to its header with `defaultOpen={false}` (or control it with `open` / `onOpenChange`). The fold is offered by placing a MessageActionCardCollapseTrigger in the header; without one the card simply stays open.
PropTypeDefault
defaultOpenUncontrolled initial state. Defaults to open.booleantrue
onOpenChange(open: boolean, eventDetails: CollapsibleRootChangeEventDetails) => void
openControlled open state. Open shows the content; closed folds to the header.boolean
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardActions

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardActionsNote

PropTypeDefault
children (required)HelperText
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardCollapseTrigger

Folds the card to its header and back. Needs an accessible `aria-label`.
PropTypeDefault
aria-label (required)Defines a string value that labels the current element.string
nativeButtonWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).booleantrue
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardCompletion, MessageActionCardContent, MessageActionCardProperty, MessageActionCardPropertyLabel, MessageActionCardProperties, MessageActionCardPropertyValue, MessageActionCardHeader

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardHeaderDescription

A line under the title: what happened on a resolved card ("Installed by Ada → Lens"), or why you cannot act on a view-only one. Place it inside MessageActionCardHeaderTitle; it stays visible while the card is folded.
PropTypeDefault
children (required)HelperText
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardHeaderIcon, MessageActionCardHeaderMeta, MessageActionCardHeaderStatus, MessageActionCardHeaderTitle

The card type's icon. Without children it shows a generic action icon.
PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardHint

PropTypeDefault
children (required)HelperText
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardHintLabel

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardNotice

Raft's standing note. Leads with an info icon unless `icon` replaces it.
PropTypeDefault
iconReplaces the default info icon.ReactNode
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardScope

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardScopeDescription

PropTypeDefault
children (required)HelperText
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardScopeList, MessageActionCardScopeListLabel

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardScopeListViewport

Scrolls a long permission list: a ScrollArea, so it is a Tab stop only while it overflows (keyboard users can scroll it; a short list adds no empty stop), and its overlay scrollbar takes no room from the rows.
PropTypeDefault
actionsRefMethods to scroll from code that the container doesn't have natively.((instance: ScrollAreaActions | null) => void | (() => void | { [UNDEFINED_VOID_ONLY]: never; }) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<ScrollAreaActions | null>
aria-label (required)Names the scroll area for screen readers, e.g. "Permissions".string
childrenThe scrolling content, in ScrollArea's own container.ReactNode
contentRefAn element whose size is the content's, watched for size changes (such as a hidden mirror of a textarea's text). Without it each element child of the container is watched, and children added or removed.RefObject<HTMLElement | null>
contentStyleStyle of the content element; renders it, as `contentClassName` does.CSSProperties
fadeFade the content out toward an edge that has more past it. The scrollbars don't fade.boolean
hideDelayHow long the scrollbars stay after scrolling stops, in ms. At least 100 with `trigger="scroll"`.number
onEdgeChangeCalled when the area reaches or leaves an edge, and after mounting when the content overflows.(edges: ScrollAreaEdges) => void
onScrollThe container's scroll events.UIEventHandler<HTMLDivElement>
orientationThe directions the area scrolls in. Content too wide for a vertical area is cut off.ScrollAreaOrientation
overscrollWhat a scroll that reaches the end does: stop there with no bounce (`none`, the default), stop there but let Mac trackpads and iOS bounce the area (`contain`), or carry on to the page behind (`auto`, which leaves the container's own `overscroll-behavior` alone). Only in the directions the area overflows right now.ScrollAreaOverscroll
railInsetRoom in px the scrollbars keep clear at each end, such as a sticky header's height, so they don't run over it. Also settable in CSS, on the root: `--r-scroll-area-rail-inset-{top,bottom,left,right}`, which don't inherit.ScrollAreaRailInset
renderAnother element in place of ScrollArea's own `<div>`, as the container (an element or a function that gets the props). It must hold children: the gutters are its first child.ReactElement | ((props, state) => ReactElement)
sizeThumb thickness: `small` is 5px, `medium` 7px; both grow while pointed at or dragged.ScrollAreaSize
tabIndexThe container's: by default `0` while there is something to scroll.number
triggerWhen the scrollbars show. They always show while scrolling or dragging.ScrollAreaTrigger

Also takes the attributes of its element.

MessageActionCardScopeName

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MessageActionCardStatus

The card's state label in the header: plain text led by a square pixel in the variant's colour, so a column of "Done" cards does not shout.
PropTypeDefault
appearance"outline" | "solid" | "soft"
variant"primary" | "accent" | "warning" | "danger" | "default" | "information" | "muted" | "success" | "busy" | "you"
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

Changes

  • 0.103.0 · Breaking ChangesExplanation slots take only a HelperText: FieldDescription, FormSection's description, a ChoiceList item's description, SelectItemDescription, DialogDescription, AlertDialogDescription, DrawerDescription, PopoverDescription, EmptyStateDescription, CardDescription, CardFooter, BannerDescription, DialogFooterNote (work in progress), MessageActionCardHint, MessageActionCardHeaderDescription, MessageActionCardScopeDescription and MessageActionCardActionsNote. A HelperText is made only by helperText(content, { why, about }): content is any ReactNode (a string, a formatted message, a TextLink inside a sentence), why is "consequence", "audience" or "recovery", and about names the thing the line is about. Each slot renders the content with data-why and data-about, and in development warns once when it is given anything else, which it still renders. ToastDescription, NotificationCenterItemBody, EmptyStateTitle, ListRowDescription and the status and data parts are unchanged.
  • 0.95.3 · FixedA label/value list that switches layout on a resize no longer raises a ResizeObserver loop error ([DescriptionList › Labels go above only when a value doesn't fit](https://raft-design.botiverse.build/components/description-list/#labels-go-above-only-when-a-value-doesnt-fit)). A horizontal DescriptionList and MessageActionCard's properties decide whether their labels go above their values (useLabelValueFit) in the next animation frame after a resize, instead of inside the ResizeObserver's callback; several resizes before that frame share one decision. The first frame, a label or value changing and a web font arriving are still decided before the paint.
  • 0.73.0 · ChangedEvery region that scrolls is a ScrollArea: PanelScrollViewport, ActivityInboxViewport, SearchShellViewport, NotificationCenterScroller, FilesViewport, TasksPanelViewport, ChoiceList's scroller, MobileNavServerPopoverList, ComposerSuggestionList, AnnouncementDialogBody, MessageActionCardScopeListViewport and DialogNav show ScrollArea's overlay scrollbar instead of the platform's. Native scrolling stays only in the places scroll-area.md lists, each with its reason, and a test fails on any other.
  • 0.10.7 · FixedIn MessageActionCardProperties, a label lines up with the first line of its value instead of the middle of a value that wraps.
  • 0.5.63 · AddedMessageActionCardHeaderDescription: a line under the title, placed inside MessageActionCardHeaderTitle, for what happened on a Done or Declined card or why you cannot act on a View only one. It stays visible while the card is folded.
  • 0.5.63 · ChangedMessageActionCardHeader aligns to the top: icon, status and collapse toggle line up with the title's first line when the title wraps or carries a description.
  • 0.5.63 · ChangedMessageActionCardNotice is a tinted block (Elegant: soft fill, rounded; Brutal: inset fill, hairline border) meant to open the content, above the properties; it now carries a bottom margin instead of a top one.
  • 0.5.63 · ChangedMessageActionCardHintLabel and MessageActionCardScopeListLabel match the property label style in Elegant; MessageActionCardActionsNote reads in the foreground colour; the notice icon is centred on the first line.