Role Permission Matrix

Role and permission matrix with roles as columns and permissions as rows, each cell a labelled checkbox. Scrolls sideways on small screens, styled in Tailwind.

src/registry/ui/role-permission-matrix.tsx/r/role-permission-matrix.json

Installation#

bash
npx shadcn@latest add @minidev/role-permission-matrix

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/role-permission-matrix.json

Usage#

tsx
import { RolePermissionMatrix } from "@/components/ui/role-permission-matrix"

export function Example() {
  return <RolePermissionMatrix />
}

API reference#

RolePermissionMatrix props
PropTypeDefault
rolesstring[]SAMPLE_ROLES
permissionsstring[]SAMPLE_PERMISSIONS
classNamestring-

Dependencies#

npm

React only

Built from

All settings page components

Learn more