Skip to main content

Overview

ApprovalCard is the card the AI chat shows when an action waits for a person’s approval. The chat also uses it to ask a question or show a form. It has a header with a title and an optional icon, a content area showing what the person reviews, and a footer with an optional hint and the buttons that answer.

Usage

That covers most cards. The only other component-specific prop is contentVariant, for content that is not a simple block. The header shows icon and title. A long title wraps instead of being cut, so a question reads in full. title takes any node: to show the record an action changes, pass the text and a chip together in a row. Leave both empty for a card without a header.

Content

The content sits in a bordered box on the primary background, with inner spacing, by default. Use contentVariant="list" for a list that draws its own rows edge to edge inside the box, and contentVariant="plain" for content that draws its own surface, such as an email editor. Several plain children are spaced like sections. The footer appears only when you pass hint or actions. hint sits at the start of the row: supporting text, the outcome of a decision, or a small control such as the pager above. Name the primary button after the action it runs and put it last. Your application owns the labels, their translations and the loading and disabled states.

Docking

ApprovalCard is built on Card, so a host docks it onto the surface below by setting --dock-bottom-border-width and --dock-bottom-radius on an ancestor. The AI chat does this above its composer. Cards nested in an ApprovalCard never dock.

Native integration

Native attributes, className, style, and ref target the root div, a Card.Root. Use render to compose a different root element. Unlike a plain Card.Root, the root inherits its text color and does not clip its content. The icon is decorative and hidden from assistive technology.

Props

ReactNode
Footer controls that answer the request, usually small Buttons with the primary action last. Omit them and hint for a card without a footer.
ReactNode
What the person reviews or fills in before answering.
string
Additional class names merged onto the root.
"boxed" | "list" | "plain"
default:"boxed"
How the content is framed: ‘boxed’ is a bordered box on the primary background with inner spacing, ‘list’ the same box without inner spacing for lists that draw their own rows, ‘plain’ no box. Defaults to ‘boxed’.
ReactNode
Optional node at the start of the footer, such as supporting text, the outcome of a decision or a pager.
ReactNode
Optional decorative icon node shown before the title.
Ref<HTMLDivElement>
Ref to the root div, or the element supplied through render.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>
Element or callback composition for the root.
CSSProperties
Inline styles forwarded to the root.
ReactNode
What the card asks about. It wraps when it is long and can hold other nodes, such as a record chip. Leave it and icon empty for a card without a header.