Component packs › Detour › Access Denied

Access Denied

A car is stopped at a barrier gate: the reader shows red and the arm stays down; a request turns it amber.

Access Denied is an error page from Detour, a component pack with 6 error and empty pages: Error and empty pages, each a small live street seen from above with one honest way forward. Price: $2 for the whole pack.

Built with: request state, reader light, reversing drive.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Access Denied props

PropTypeDefaultDescription
ownerstringWho decides, shown in the message.
onRequest() => Promise<unknown> | void
onSwitch() => void
previewbooleanShowcase mode: the buttons say what they would do instead of acting.
widthnumber420Width in px. Default 420.
darkboolean

Methods on the ref

Use it in React

import AccessDenied from './AccessDenied';

<AccessDenied />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Detour

Good for: 404 and empty states.