Roles and permissions preview
Assign workspace roles and inspect direct or inherited permissions in matrix and compact list views.
pro · Blocks · composite
When to use
- Use it when a page needs assign workspace roles and inspect direct or inherited permissions in matrix and compact list views.
- Choose it inside an authenticated product surface when the host application owns routing, persistence, and service calls.
Alternatives
- Choose empty-state instead when empty collections, search results and errors with a clear next action is the actual interface need, rather than roles and permissions.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/roles-permissionsImport components/ui/tidal.css, components/ui/roles-permissions.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/roles-permissions.css";
import{TidalRolesPermissions}from"./components/ui/roles-permissions";
export default()=><div className="tidal-scope"><TidalRolesPermissions grants={{}} permissions={[{id:"example",groupId:"example",groupLabel:"Demo",label:"Demo"}]} roles={[{id:"example",label:"Demo"}]} title={"Demo"} view={"list"}/></div>;API and props
TidalRolesPermissions.grants (required)Readonly<Record<string, ReadonlyArray<string>>>Direct, editable permission IDs keyed by role ID.
TidalRolesPermissions.permissions (required)ReadonlyArray<TidalPermissionDefinition>Required permissions value accepted by this exported component.
TidalRolesPermissions.roles (required)ReadonlyArray<TidalPermissionRole>Required roles value accepted by this exported component.
TidalRolesPermissions.title (required)ReactNodeRequired title value accepted by this exported component.
TidalRolesPermissions.view (required)"list" | "matrix"Required view value accepted by this exported component.
TidalRolesPermissions.descriptionReactNodeOptional description value accepted by this exported component.
TidalRolesPermissions.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalRolesPermissions.emptyMembersReactNodeOptional empty members value accepted by this exported component.
TidalRolesPermissions.emptyPermissionsReactNodeOptional empty permissions value accepted by this exported component.
TidalRolesPermissions.footerReactNodeOptional footer value accepted by this exported component.
TidalRolesPermissions.groupInputProps((role: TidalPermissionRole, groupId: string) => NativeCheckboxProps | undefined) | undefinedOptional group input props value accepted by this exported component.
TidalRolesPermissions.groupInputRef((roleId: string, groupId: string) => Ref<HTMLInputElement> | undefined) | undefinedOptional group input ref value accepted by this exported component.
TidalRolesPermissions.headingLevel"h2" | "h3" | "h4" | "h5" | undefinedOptional heading level value accepted by this exported component.
TidalRolesPermissions.inheritedGrantsReadonly<Record<string, ReadonlyArray<string>>> | undefinedEffective permissions inherited from another policy. Inherited cells are read-only.
TidalRolesPermissions.labelsPartial<{ matrix: ReactNode; list: ReactNode; view: string; permissions: string; members: ReactNode; role: ReactNode; inherited: ReactNode; direct: ReactNode; unavailableRole: string; configurationError: ReactNode; }> | undefinedOptional labels value accepted by this exported component.
TidalRolesPermissions.listButtonPropsNativeButtonProps | undefinedOptional list button props value accepted by this exported component.
TidalRolesPermissions.listButtonRefRef<HTMLButtonElement> | undefinedOptional list button ref value accepted by this exported component.
TidalRolesPermissions.matrixButtonPropsNativeButtonProps | undefinedOptional matrix button props value accepted by this exported component.
TidalRolesPermissions.matrixButtonRefRef<HTMLButtonElement> | undefinedOptional matrix button ref value accepted by this exported component.
TidalRolesPermissions.matrixRegionPropsOmit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "dangerouslySetInnerHTML"> | undefinedOptional matrix region props value accepted by this exported component.
TidalRolesPermissions.matrixRegionRefRef<HTMLDivElement> | undefinedOptional matrix region ref value accepted by this exported component.
TidalRolesPermissions.membersReadonlyArray<TidalPermissionMember> | undefinedOptional members value accepted by this exported component.
TidalRolesPermissions.onGroupChange((roleId: string, groupId: string, granted: boolean, editablePermissionIds: readonly string[], event: ChangeEvent<HTMLInputElement>) => void) | undefinedCallback invoked when the group change interaction is proposed.
TidalRolesPermissions.onMemberRoleChange((memberId: string, roleId: string, event: ChangeEvent<HTMLSelectElement>) => void) | undefinedCallback invoked when the member role change interaction is proposed.
TidalRolesPermissions.onPermissionChange((roleId: string, permissionId: string, granted: boolean, event: ChangeEvent<HTMLInputElement>) => void) | undefinedCallback invoked when the permission change interaction is proposed.
TidalRolesPermissions.onViewChange((view: "matrix" | "list", event: MouseEvent<HTMLButtonElement>) => void) | undefinedCallback invoked when the view change interaction is proposed.
TidalRolesPermissions.permissionInputProps((role: TidalPermissionRole, permission: TidalPermissionDefinition) => NativeCheckboxProps | undefined) | undefinedOptional permission input props value accepted by this exported component.
TidalRolesPermissions.permissionInputRef((roleId: string, permissionId: string) => Ref<HTMLInputElement> | undefined) | undefinedOptional permission input ref value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- The host application owns data, validation, persistence, navigation, and service side effects described by this API.