ComponentsEnterprisePermissionMatrix

PermissionMatrix

PermissionMatrix reviews and edits grants across resources and capabilities.

Semantic tableInherited grantsUnavailable cellsBulk controlsRead-only

Overview

Use PermissionMatrix when administrators must compare and edit the same capabilities across multiple governed resources.

Workspace role

Live preview
Permissions by resource
ResourceReadEditDelete
ProjectsPortfolio recordsInherited
BillingInvoices and plans—
RolePermissions.tsx
tsx
import { PermissionMatrix } from 'omverse-ui'
 
const permissions = [
{ id: 'read', label: 'Read' },
{ id: 'edit', label: 'Edit' },
]
 
const resources = [
{ id: 'projects', label: 'Projects' },
{ id: 'billing', label: 'Billing', unavailable: ['edit'] },
]
 
<PermissionMatrix permissions={permissions} resources={resources} defaultValue={{ projects: ['read'] }} />

Anatomy

A semantic matrix relates resource rows to capability columns and distinguishes direct, inherited, and unavailable cells.

ResourceViewEditDelete
Projects✓□□
Billing✓□—
  1. 1
    Resource header

    Names the row dimension.

  2. 2
    Capability headers

    Names permission columns.

  3. 3
    Resource identity

    Labels each governed object.

  4. 4
    Grant cell

    Shows and changes access.

  5. 5
    Unavailable cell

    Explains an invalid pairing.

When to use

PermissionMatrix is best when role and policy decisions need direct side-by-side comparison.

Recommended

  • Configure roles

    Compare capabilities across resources.

  • Review inherited access

    Keep policy grants visible.

  • Identify exceptions

    Reveal direct and unavailable combinations.

When not to use

Avoid this component for single booleans or conversational history.

Avoid

  • Do not use for one-off permission

    Use Checkbox for isolated toggles.

  • Do not hide policy origin

    Keep inherited state visible.

  • Do not replace event history

    Use AuditLog for evidence timelines.

Variants

Outlined

Default bordered grid.

Filled

Tonal policy surface.

Raised

Independent floating block.

Density

Three row heights.

States

Track direct grants, inherited access, unavailable pairs, and read-only mode states.

StateTriggerVisual responseInteraction
GrantedDirect grantCheckedCan revoke
Not grantedNo grantUncheckedCan grant
InheritedParent policyChecked and labeledCannot edit here
UnavailableInvalid pairingDashNo control
Read-onlyReview modeResolved grantsNo changes

Behavior

Direct grants

Controlled value stores editable grants.

Inheritance

Resource metadata resolves policy.

Bulk rows

Toggle all editable permissions in one resource.

Bulk columns

Toggle one permission across resources.

Accessibility

KeyAction
TabMoves through editable grants and bulk controls.
SpaceToggles the focused checkbox.
EnterActivates bulk operations.
  • Use table, caption, row headers, and column headers.
  • Name every checkbox by capability and resource.
  • State inherited status in text.
  • Represent unavailable pairs without hidden controls.

Content guidelines

Use concise governance language that maps to policy and product structure.

Use capability verbs

Name the allowed operation.

ExampleRead, Edit, Delete

Use resource nouns

Use product objects consistently.

ExampleProjects, Billing

Name policy origin

Explain inherited grants.

ExampleInherited from Workspace admin

Examples

Use inherited grants to show which permissions are inherited versus directly assigned.

Read-only inherited grant

Live preview
☑ View projects Inherited from Workspace admin

Props / API

PermissionMatrix extends div attributes.

Props

PropTypeDefaultDescription
permissionsreadonly PermissionMatrixPermission[]requiredCapability columns.
resourcesreadonly PermissionMatrixResource[]requiredResource rows and constraints.
valuePermissionMatrixValueundefinedControlled direct grants.
defaultValuePermissionMatrixValue{}Initial direct grants.
onValueChange(value) => voidundefinedRuns after grant changes.
captionReactNode'Permissions by resource'Accessible table caption.
readOnlybooleanfalsePrevents grant changes.
loadingbooleanfalseShows loading status.
showBulkControlsbooleantrueShows row and column toggles.
variant'outlined' | 'filled' | 'raised''outlined'Surface treatment.
size'sm' | 'md' | 'lg''md'Cell density.