→ Blocks
Building something custom?
A Template gets you shipped in one file. If you'd rather assemble your own layout, these are the same tested primitives the templates are built from — preview one live, copy the source, or install it with the shadcn CLI.
→ Feedback
Access Denied Screen
A static "you don't have access" view — no access-code form in it at all.
→ Session
Access Receipt
A small session audit strip shown after unlock — timestamp, storage mode, timeout, and verification strategy.
→ Routing & Layout
Embedded Gate
Knock Codes fixed to the inline shell — sits naturally inside an existing layout.
→ Core
Gate Wrapper
The shared outer-positioning primitive every visible block composes on.
→ Core
Knock Codes
The main gate — renders children when unlocked, otherwise an access-code prompt.
→ Session
Logout Button
Reads the shared session from a Session Provider and clears it on click.
→ Core
PIN Input
Masked access-code input (PIN or passphrase) with paste support and accessible loading/error states.
→ Modal & Overlay
Protected Card
A card-shaped gate for protecting one section of a page rather than the whole viewport.
→ Routing & Layout
Protected Layout
Knock Codes shaped for a full-page shell — header/footer stay visible even while locked.
→ Modal & Overlay
Protected Modal
Content stays mounted and blurred behind a modal Unlock Dialog instead of being replaced.
→ Routing & Layout
Protected Route
Knock Codes shaped for route-level guarding, with an optional custom unauthorized state.
→ Session
Session Provider
Shares one useKnockCodes session across a tree, so multiple components stay in sync.
→ Session
Session Timeout Banner
Warns before the shared session expires, with a one-click way to log out immediately.
→ Routing & Layout
Standalone Gate
The fastest path to a working gate: wrap your app, pass a hash, done.
→ Modal & Overlay
Unlock Dialog
A non-dismissable modal access-code prompt — no backdrop click, no Escape-to-close.
→ Feedback
Verification Loader
A small presentational spinner + label for the in-flight verification moment.