Componentfeedback0.84 KB gzipZero dependencies

Permission Denied

Access denied panel with lock icon and request-access flow.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add permission-denied

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { PermissionDenied } from "@/components/ui/permission-denied"; <PermissionDenied />

Source code

permission-denied.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxpermission-denied.tsx50 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface PermissionDeniedProps extends React.HTMLAttributes<HTMLDivElement> {  resource?: string;  onRequestAccess?: () => void;  requested?: boolean;} /** Permission denied state panel: lock icon + request access. */export function PermissionDenied({ resource = "this resource", onRequestAccess, requested, className, ...props }: PermissionDeniedProps) {  const [sent, setSent] = React.useState(false);  const isSent = requested ?? sent;   return (    <div className={cn("flex w-full max-w-sm flex-col items-center gap-4 rounded-lg border border-dashed border-border p-8 text-center", className)} {...props}>

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { PermissionDenied } from "@/components/ui/permission-denied"; <PermissionDenied />
PropTypeDescription
resourcestringConfigures resource. (Default: "this resource")
onRequestAccess() => voidCallback invoked on request access.
requestedbooleanToggles requested.