Components, Chat
Approval request
The card an agent shows when it is waiting for your decision.
Save 4 drafts to your Gmail drafts folder?
Nothing is sent. You can review and send them yourself after saving.
The approval request is the card an agent shows when it is waiting for a person’s decision. It is a floating surface with a question and one fill button. The preview here is static. Props and accessibility behavior are settled at implementation time.
Anatomy
| Part | Rule |
|---|---|
| Surface | Card raised: card + 1px border + shadow-sm, corner radius 12, padding 16×18 |
| Question | 16px, weight 600. Write it as a question (“Save 4 drafts to your Gmail drafts folder?”) |
| Description | 14px muted-foreground. Say what happens and whether it can be undone |
| Button row | One fill button (approve) and one outline button (later). One ghost sm button can sit at the right end (“Don’t ask in this conversation”) |
- Approval of a dangerous action uses
dangerin place of the fill. - When the decision is made, the card shrinks to a one-line record (“Saved”).
What you provide
- The question, the description and the button labels. The label of the approve button is what happens (“Save”). Don’t use “OK” or “Yes”.
Markup
<div class="Approval_card">
<div><div class="Approval_title">Save 4 drafts to your Gmail drafts folder?</div><div class="Approval_desc">Nothing is sent.</div></div>
<div class="Approval_actions">
<button type="button" class="BaseButton_btn BaseButton_btn--fill BaseButton_btn--md">Save</button>
<button type="button" class="BaseButton_btn BaseButton_btn--outline BaseButton_btn--md">Not now</button>
</div>
</div>
Don’t
- Don’t put two fill buttons in one card.
- Don’t add a color band, a color surface or icon decoration to the card. Floating is enough to make it stand out.