Permission Denied

A 403 style access card explaining that admin rights are needed, with Request access and Switch workspace buttons. Use it wherever a route is role gated.

src/registry/ui/permission-denied.tsx/r/permission-denied.json

Installation#

bash
npx shadcn@latest add @minidev/permission-denied

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/permission-denied.json

Usage#

tsx
import { PermissionDenied } from "@/components/ui/permission-denied"

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

API reference#

PermissionDenied props
PropTypeDefault
classNamestring-

Dependencies#

npm

React only

Built from

All alerts, toasts and empty states