- Label
- Icon label
- Field
- Form
- Frontmatter form
- Questionnaire
- Input
- Input group
- Input OTP
- Password input
- Password strength
- Code input
- Number field
- Tag input
- Textarea
- Checkbox
- Radio group
- Language toggle group
- Emoji appearance toggle group
- Emoji picker
- Avatar picker
- AI provider picker
- Select
- Native select
- Combobox
- Language combobox
- Slider
- Calendar
- Switch
- Alert
- Avatar
- Badge
- Card
- AI provider card
- Model info card
- Model list
- Empty
- Item
- Tree item
- File tree
- Icon media
- File type icon
- Font preview
- Image preview
- Kbd
- Table
- Data table
- Data table column header
- Chart
- Code Block
- Code card
- Markdown view
- Attachment
- Bubble
- Marker
- Message
- Chat message
- Chat suggestion item
- Message scroller
- Trace
- Progress
- Spinner
- Sonner
- Toast
- Unsaved changes toolbar
- Unsaved indicator
- Status indicator
- Permission card
- Separator
- Skeleton
- Animated grid pattern
- Meteors
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#
pnpm dlx shadcn@latest add @zui/permission-cardThe CLI writes components/feedback/permission-card.tsx, installs Badge,
Card, Icon, Text children and Utils,
and adds lucide-react-native.
Usage#
import {
PermissionCard,
PermissionCardActions,
PermissionCardResolved,
PermissionCardStatus,
PermissionCardTitle,
} from '@/components/feedback/permission-card';<PermissionCard status={status}>
<CardHeader>
<PermissionCardTitle>Run deploy.sh</PermissionCardTitle>
<CardDescription>Deploy the web app to production</CardDescription>
<PermissionCardStatus>{statusWord}</PermissionCardStatus>
</CardHeader>
<PermissionCardActions>
<Button variant="ghost" onPress={deny}>
<Text>Deny</Text>
</Button>
<Button onPress={allow}>
<Text>Allow once</Text>
</Button>
</PermissionCardActions>
<PermissionCardResolved>
<CardDescription>Allowed once - 2:14pm</CardDescription>
</PermissionCardResolved>
</PermissionCard>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#
PermissionCard
|-- CardHeader
| |-- PermissionCardTitle
| |-- CardDescription
| `-- PermissionCardStatus
|-- PermissionCardActions
| |-- Button
| `-- ButtonGroup
| |-- Button
| `-- DropdownMenu
`-- PermissionCardResolved
`-- CardDescriptionAPI reference#
PermissionCard#
Takes every prop of Card, plus:
| Prop | Type | Default |
|---|---|---|
status | 'pending' | 'approved' | 'denied' | required |
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-slotanddata-statusattributes are not set; a View takes no data attributes.