Skip to content

Function: UnlessRole() ​

ts
function UnlessRole(props): Element | null;

Defined in: packages/react/src/components.tsx:77

Renders children if the user does NOT have the role(s) — like spatie's @unlessrole. anyOf: none of them. allOf: not all of them. Without a condition it renders fallback (deny by default).

Parameters ​

ParameterType
propsUnlessRoleProps

Returns ​

Element | null

Released under the MIT License. Inspired by spatie/laravel-permission.