ZUI

Search documentation

Find a page or a heading.

Permission card

An inline, non-modal AI-consent request that stays in scrollback after it resolves, showing its decision row while pending and its resolved row once the host settles its status.

Installation

bash

The CLI writes components/feedback/permission-card.tsx, installs Badge, Card, Icon, Text children and Utils, and adds lucide-react-native.

Usage

tsx
tsx

The decision row is asymmetric on purpose: pair a plain Deny with a graduated Allow, such as a Button group holding a scope menu. Use it for an inline, non-modal consent request inside a chat transcript that needs a decision; for a tool call with no decision to make, use Trace instead.

Composition

text

API reference

PermissionCard

Takes every prop of Card, plus:

It defaults Card's size to sm. The host owns status; nothing inside the card changes it. While it holds a PermissionCardActions or a PermissionCardResolved as a direct child, it drops its bottom padding, as a Card does for its footer. The PermissionCardStatusValue type is exported from the same file.

PermissionCardTitle

Takes every prop of CardTitle: what the assistant asks to do, announced as a heading, on one truncated line.

PermissionCardStatus

Takes every prop of Badge, outline unless given another variant (destructive for a denied request). Its children are the status word, set in a Text when a string. Its icon follows the card's status, a circle while pending, a check once approved and a cross once denied, and is hidden from a screen reader, which reads the word.

PermissionCardActions

Takes every prop of CardFooter: the decision row, laid out to the end, drawn only while the request is pending.

PermissionCardResolved

Takes every prop of CardFooter: the persisted outcome, drawn once the request is approved or denied.

Differences from the web

  • The status badge sits under the description; the web places it at the header's end through upstream's CardAction, which the native Card has not.
  • The hidden row is not rendered; the web keeps both rows in the page and hides one by a group selector, which a device has no counterpart of.
  • The approved icon is a static check; the web's plays its animation.
  • The web's data-slot and data-status attributes are not set; a View takes no data attributes.