Permission Matrix
Roles and permissions matrix: inheritance, locks, bulk toggles, draft changes. Pro · Account and access › Permissions, privacy and support
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add permission-matrix
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { PermissionMatrix } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
roles * | PermissionRole[] | Grid columns, in order; a role can inherit another role's grants or be locked as all-access. | |
permissions * | PermissionDefinition[] | Grid rows, gathered under their group (resource). | |
groups | PermissionGroup[] | Order and names of the groups. Groups used by permissions but not listed are appended. | |
value | PermissionGrants | Saved explicit grants: role id → permission ids. | |
defaultValue | PermissionGrants | Initial value when uncontrolled. | |
onValueChange | (grants: PermissionGrants) => void | Called with the new grants once a save succeeded. | |
onSave | (grants: PermissionGrants, changes: PermissionChange[]) => unknown | Persists the draft. May return a promise: the bar shows a spinner and the draft is kept until it resolves; a rejection keeps the draft and shows an error. | |
lockedCells | PermissionCellRef[] | Individual cells frozen at their saved value (e.g. by a policy). | |
defaultCollapsedGroups | string[] | Groups shown collapsed at first. | |
readOnly | boolean | false | No editing: checkboxes become read-only and the changes bar never shows. |
toolbar | ReactNode | Extra content at the end of the toolbar. | |
locale | string | Number formatting. Defaults to the ThemeProvider locale, then the browser's. | |
labels | Partial<PermissionMatrixLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Related components
- Audit Log — Activity log: filters, field diffs, CSV export, load more
- Privacy Center — Privacy center: score, setting groups, protection counters
- Support Center — Support: contact channels with status, tickets with filters
- Two Factor Setup — Two-factor setup: method, QR code or phone, code verification
- Active Sessions — Active sessions: current device, suspicious sign-ins, revoke access
- Access Tokens — Personal access tokens: scope, last used, revoke
- Age Gate — Age verification: date of birth, remember me, deny under the limit
- Profile Details — Profile: completeness, verified contacts, fields
- Address Book — Address book: home, work, default addresses and actions
- Social Profiles — Linked social profiles: reorder, verify, copy link
- Settings Panel — Settings page: section navigation, unsaved-changes bar, danger zone
Previous: Settings Panel · Next: Audit Log · All Account and access