Skip to content

PermissionGateProps

PermissionGateProps = object

Defined in: packages/ui/src/types.ts:1061

Props for the PermissionGate component.

Conditionally renders children based on action permission status from @cfast/actions. When the action is permitted, children is rendered. When forbidden but not invisible, fallback is rendered. When the action is invisible (no relation at all), nothing is rendered.

WhenForbidden for the related behavior modes used by ActionButton.

action: ActionHookResult

Defined in: packages/ui/src/types.ts:1063

Action hook result providing permission status.


children: ReactNode

Defined in: packages/ui/src/types.ts:1065

Content rendered when the action is permitted.


optional fallback: ReactNode

Defined in: packages/ui/src/types.ts:1067

Content rendered when the action is forbidden but not invisible.