MessageActionCard
Suggested action card composed inside a MessageItem body for commit-style workflows.
import {
MessageActionCard,
MessageActionCardActions,
MessageActionCardActionsNote,
MessageActionCardCollapseTrigger,
MessageActionCardContent,
MessageActionCardHeader,
MessageActionCardHeaderIcon,
MessageActionCardHeaderDescription,
MessageActionCardHeaderTitle,
MessageActionCardHint,
MessageActionCardHintLabel,
MessageActionCardNotice,
MessageActionCardProperties,
MessageActionCardProperty,
MessageActionCardPropertyLabel,
MessageActionCardPropertyValue,
MessageActionCardScope,
MessageActionCardScopeDescription,
MessageActionCardScopeList,
MessageActionCardScopeListLabel,
MessageActionCardScopeListViewport,
MessageActionCardScopeName,
MessageActionCardStatus,
} from "raft-ui";
<MessageActionCard defaultOpen>
<MessageActionCardHeader>
<MessageActionCardHeaderIcon />
<MessageActionCardHeaderTitle>
<MessageActionCardHeaderDescription />
</MessageActionCardHeaderTitle>
<MessageActionCardStatus />
<MessageActionCardCollapseTrigger aria-label="Show or hide details" />
</MessageActionCardHeader>
<MessageActionCardContent>
<MessageActionCardNotice />
<MessageActionCardProperties>
<MessageActionCardProperty>
<MessageActionCardPropertyLabel />
<MessageActionCardPropertyValue />
</MessageActionCardProperty>
</MessageActionCardProperties>
<MessageActionCardHintLabel>Reason</MessageActionCardHintLabel>
<MessageActionCardHint />
<MessageActionCardScopeList>
<MessageActionCardScopeListLabel />
<MessageActionCardScopeListViewport aria-label="Permissions">
<MessageActionCardScope>
<MessageActionCardScopeName />
<MessageActionCardScopeDescription />
</MessageActionCardScope>
</MessageActionCardScopeListViewport>
</MessageActionCardScopeList>
<MessageActionCardActions>
<MessageActionCardActionsNote />
</MessageActionCardActions>
</MessageActionCardContent>
</MessageActionCard>Creating a channel, creating an agent and adding members open the regular dialog with the agent's values filled in, so the person can change anything before it is created. The primary button is therefore "Review", not the action itself.
App login, install, registration, update and owner recovery run in one click, so the primary button names the action. Permissions sit in a small scrolling area so a long list never stretches the card; a standing notice is neutral, never a warning colour.
Paused and confirm-again cards stay open because they still wait on the reader. Done, declined and view-only cards fold to their header with defaultOpen=false; the header toggle opens them again. An open card's note left of the buttons says why it needs you now or why it is paused; a folded card says what happened, or why you cannot act, under its title, so the line shows while folded. A failed click is temporary: the product shows a toast and the card stays as it was, ready to retry.
...propsdefaultOpenopen / onOpenChange| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Suggested-action card root. Compose inside MessageItemBody; execution state stays consumer-owned. |
defaultOpen | boolean | — | Start open (default) or folded to the header. Fold resolved and view-only cards. |
open / onOpenChange | boolean / (open: boolean) => void | — | Controlled fold state. The content height animates; reduced motion skips it. |
MessageActionCardHeaderIconMessageActionCardHeaderTitleMessageActionCardHeaderDescriptionMessageActionCardStatusMessageActionCardCollapseTriggerMessageActionCardScopeListViewportMessageActionCardActionsNote| Prop | Type | Default | Description |
|---|---|---|---|
MessageActionCardHeaderIcon | useRender.ComponentProps<"span"> | — | Leading type icon box in the header band. Pass one lucide icon; without children it shows a generic action icon (Zap). |
MessageActionCardHeaderTitle | useRender.ComponentProps<"span"> | — | Title text; takes the remaining width so status and toggle sit at the end. |
MessageActionCardHeaderDescription | useRender.ComponentProps<"span"> | — | A line under the title, placed inside MessageActionCardHeaderTitle: 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. |
MessageActionCardStatus | BadgeProps | — | State label, written as plain text led by a square pixel in the variant's colour. |
MessageActionCardCollapseTrigger | Collapsible.Trigger props & { "aria-label": string } | — | Chevron toggle that folds the card to its header and back. |
MessageActionCardScopeListViewport | useRender.ComponentProps<"div"> & { "aria-label": string } | — | Scroll area for the scopes; the cap cuts through the third row. aria-label is required; it is a Tab stop only while the list overflows. |
MessageActionCardActionsNote | useRender.ComponentProps<"div"> | — | Left side of the actions row on an open card: why it needs you now (Confirm again) or why it is paused. A card that folds by default puts its line in MessageActionCardHeaderDescription instead. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Outer title row. Compose the action title and any trailing status here. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"span"> | — | Trailing header region. Use render to apply its alignment to a caller-owned badge or status. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | White inner content stack for details, notice, actions, and completion. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"dl"> | — | Optional aligned definition list for compact action properties. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Semantic label/value pair in the shared Properties grid; it does not create its own surface. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"dt"> | — | Muted metadata label with a shared column width. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"dd"> | — | Metadata value that wraps without widening the card. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Optional named scope section rendered directly in the content stack. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Heading for a scope list. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | One bordered scope explanation block. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Scope identifier. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Scope capability explanation. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Label above the agent's reason, e.g. Reason. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | The agent's own reason for the card, shown as an italic quote under MessageActionCardHintLabel. |
...propsicon| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Raft's standing note about what the action does or who may run it. A tinted block with a leading icon that opens the content, above the properties; only for the cards that need one. The agent's own reason goes in MessageActionCardHint, not a notice. |
icon | ReactNode | — | Replaces the default leading info icon. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Pre-commit action area. Buttons and dialog state stay consumer-owned. |
...props| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Legacy result line at the end of the content. Prefer MessageActionCardHeaderDescription, which stays visible when the card is folded. |