032
When an agent wants more access it hands you a boarding pass that says who, what and why; pick once, an hour or always, approve, and the stub tears off along the perforation into a little pass with a countdown and Revoke.
akapermission·scopes
Run this in any project set up for the shadcn CLI. It copies the Access Pass source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/access-pass.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { AccessPass } from "@/components/access-pass";
export default function Page() {
return <AccessPass />;
}A free React component in the Trust & Control collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Access Pass source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| requestrequired | AccessPassRequest | — |
| durations | AccessPassDuration[] | defaultDurations |
| defaultDuration | string | durations[1]?.id ?? durations[0]?.id |
| onApprove | (duration: AccessPassDuration) => void | — |
| onDeny | () => void | — |
| onRevoke | () => void | — |
| className | string | — |