
Description List
Tables
Search by name, tag, category or type
Source and install need .
pnpm dlx shadcn@latest add @assembli/permissions-matrixThe roles and permissions grid from team settings: roles across the top, permissions grouped by resource down the side. Group rows hold a tri-state checkbox per role and collapse. Permissions can require others, so granting delete grants edit and revoking edit takes delete. Cells light their row and column, changes get a dot and a save bar counts them. Filterable, keyboard-driven, Owner locked.
Other props pass through to the root element.
roles*
PermissionRole[]
groups*
PermissionGroup[]
value
PermissionGrants
defaultValue
PermissionGrants
onValueChange
(value: PermissionGrants) => void
defaultCollapsed
string[]
Group ids that start collapsed.
onSave
(value: PermissionGrants) => void | Promise<void>
Shows a save bar while there are changes. Resolve to clear it.
| Prop | Type | Default | Description |
|---|---|---|---|
| roles* | PermissionRole[] | – | |
| groups* | PermissionGroup[] | – | |
| value | PermissionGrants | – | |
| defaultValue | PermissionGrants | – | |
| onValueChange | (value: PermissionGrants) => void | – | |
| defaultCollapsed | string[] | – | Group ids that start collapsed. |
| onSave | (value: PermissionGrants) => void | Promise<void> | – | Shows a save bar while there are changes. Resolve to clear it. |