Skip to content
Signature

BracketFrame

Wraps content in corner-bracket reticles with optional corner labels; the brackets can converge onto the content as an animated targeting lock.

● LIVE
TARGET // LOCK

Target Acquired

SEC // 0x4A2 :: SIGNAL NOMINAL

npx shadcn@latest add https://okibi.cndr.dev/r/bracket-frame.json

Installation

Install the theme first, then add the component:

npx shadcn@latest add https://okibi.cndr.dev/r/bracket-frame.json

Copy the source from the Code tab above into components/ui/bracket-frame.tsx. It uses the cn helper and the okibi theme tokens — install the theme first if you haven't.

Usage

import { BracketFrame } from "@/components/ui/bracket-frame"

<BracketFrame label="SEC // 01" color="primary">
  Framed content
</BracketFrame>

Anatomy

<BracketFrame label="SEC // 01" color="border-strong">
  {/* four decorative corner brackets + optional label bands
      wrap your content — the content stays fully interactive */}
  Framed content
</BracketFrame>

Examples

Corner labels

Set a header label and any of the four corners, and switch the reticle color (primary / magenta / cyan) to frame a panel with HUD annotations.

● LIVE
TARGET // LOCK

Grid Reference

SEC // 0x4A2 :: SIGNAL NOMINAL

Lock-on

Set animate to make the corner brackets converge onto the content with a hard snap — a HUD reticle acquiring its target. Drive it with trigger: on hover, on focus, when scrolled into view, or held always. Reduced motion renders the brackets already-locked.

● LIVE
TGT // 01
Throughput
847req/s
increase 12.4%
LOCKED
Latency
38ms
decrease 3.1%

Reticle colors

Every reticle color side by side — primary, magenta, cyan, and the neutral border-strong.

● LIVE
PRIMARY // SPARK

RETICLE :: primary

MAGENTA // 0xF2

RETICLE :: magenta

CYAN // 0x3C

RETICLE :: cyan

BORDER-STRONG // GRAPHITE

RETICLE :: border-strong

API Reference

BracketFrame

PropTypeDefaultDescription
labelstringMono header label, top-left.
corners{ tl?, tr?, bl?, br?: string }Small mono labels pinned near each corner.
color"primary" | "magenta" | "cyan" | "border-strong""primary"Reticle color — accent hues or the neutral graphite border-strong.
animatebooleanfalseConverge the brackets onto the content.
trigger"hover" | "focus" | "view" | "always""hover"What drives the converge when animate.
asElementType"div"Render element.

Accessibility

  • The corner brackets are decorative — pointer-events-none and aria-hidden, so the framed content stays fully interactive.
  • Corner and header labels are aria-hidden too; they read as visual chrome, not announced content.
  • Selection semantics (e.g. aria-selected) stay on the host element — the reticle never owns state.
  • The lock-on is CSS-only at --duration-fast with no overshoot, and renders already-locked under prefers-reduced-motion.

Guidelines

Do

  • Use color='border-strong' for a neutral graphite reticle, or primary/magenta/cyan for an accent.
  • Drive the converge with animate + triggerhover/focus reset on leave, view/always stay locked.
  • Keep real semantics (selection, focus, roles) on the content you wrap, not on the frame.

Don't

  • Don't hang interactive behavior or accessible state on the brackets — they're aria-hidden decoration.
  • Don't expect trigger='view' to re-arm; it locks once on first intersect and stays.
  • Don't put essential copy in the corner labels — they're hidden from assistive tech.

On this page