Neon Frame
A HUD frame with corner brackets that draw in and label tabs.
Uplink
412 Mbps
- Latency
- 38 ms
- Packet loss
- 0.02 %
- Handshake
- 4 s ago
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/neon-frame.jsonUsage
import { NeonFrame } from "@/components/ui/neon-frame"
<NeonFrame as="section" label="Relay KX-7" tabs={{ topRight: "Ch 04" }}>
…
</NeonFrame>Examples
Pick a target
active locks the chosen frame on: its brackets tighten and brighten. active={false} parks the others in standby, as unlit glass that lights on hover and focus. Native radios keep the arrow keys.
Tabs on every corner
As a figure, the label names it. Tabs take any content, like a recording dot. A small amber frame inside marks a detection.
API reference
Also accepts the native attributes of the element it renders. Corners are square so the brackets meet them; padding comes from className.
| Prop | Type | Default |
|---|---|---|
as | "div"Element to render. | "div" |
label | ReactNodeThe frame's name, on a lit tab at the top-left edge. On anything but a div it also labels the element. | None |
tabs | { topRight?: ReactNode; bottomLeft?: ReactNode; bottomRight?: ReactNode }Quieter tabs on the other corners, for a channel, a status or a reading. | None |
scanline | booleanA slow scan line sweeps down over the content. | false |
bracket | numberLength of each bracket arm in pixels. | 18 |
active | booleanLeave undefined for a frame that is always lit. true locks on (brackets tighten and brighten); false parks it in standby until hovered or focused. | None |
animate | booleanDraw the brackets in from the corners when the frame scrolls into view. | true |
color | NeonColorBracket and label color. Falls back to --neon-accent, then cyan. | inherited |
Accessibility
- Brackets, the scan line and the corner light are aria-hidden; tabs are plain text, read in order around the content.
- Rendered as a section, article, aside or figure, the frame is named by its label through aria-labelledby, unless you pass aria-label or aria-labelledby.
- Focus inside the frame brightens the brackets, the same as hover, and lights a standby frame.
- With reduced motion the brackets and tabs appear at once and there is no scan line.