Skip to content
caliper ui pro docs

Roles permissions

A matrix of roles against permissions.

Pro

Permissions apply to everyone in the role, the moment you save.

PermissionOwner1 memberAdmin2 membersEditor3 membersViewer1 member
Work
View projects
Edit projects
Publish changesMake edits live for customers
Delete projects
People
Invite people
Change roles
Remove people
Billing
View invoices
Change plan

When to use

  • Defining who can do what.

When not to use

  • Few roles.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/roles-permissions

Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

RolesPermissions

6 props
PropTypeDefaultDescription
roles *readonly Role[]—
groups *readonly PermissionGroup[]—
value *Readonly<Record<string, readonly string[]>>—The saved matrix: role id to the permission ids it has.
onSave *(next: Readonly<Record<string, readonly string[]>>) => void—
onCreateRole((name: string) => void)—Called with a new role's name. It starts with the permissions of the first editable role.
classNamestring—

Keyboard

Escape
Closes or cancels, then returns focus to where it came from.

Accessibility

It exposes region and status semantics, with aria-label and aria-hidden kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/roles-permissions.md

The index of every part is at /llms.txt.

More in Team