Lock grant
A permission that unlocks, physically: the shackle lifts and swings open and the row turns green.
On this page
Grant a tool permission and the shackle lifts and swings open as the row turns green; revoke and it drops back and clicks shut.
The row's lock is closed while the agent cannot do the thing. Grant it and the shackle lifts out of the body and swings open on its hinge, the row takes the green of things allowed and the switch slides over. Revoke and the shackle drops back in and clicks shut. One row, one decision, readable from across the room.
Installation
Usage
import { LockGrant } from "@/components/ui/chatcn/lock-grant"
<LockGrant label="Read your calendar" detail="Scheduling agent, this session" granted={granted} onGrantedChange={setGranted} />Props
| Prop | Type | Notes |
|---|---|---|
label | string | What is being allowed |
detail | string | Who gets it, or for how long |
granted / onGrantedChange | boolean |
Keyboard
| Key | Action |
|---|---|
Space / Enter | Grant or revoke |
Accessibility
- A
role="switch"button witharia-checked, named by its label.
Motion
- The shackle lifts, then turns on its hinge, 160 ms each; the row colour fades 300 ms. Reduced motion: the shackle just rises.