Skip to content

COMPONENT / hud-image-frame

HUD Image Frame_

Void-black media frame with signal corner brackets, a centre reticle, a static scan line, an outlined index numeral and a caption. Requires @cybr/tokens.

Install

  1. 1. Map the @cybr namespace, once per project. Add this inside your components.json, or into its existing "registries" object. No components.json yet? Run npx shadcn@latest init first to create one.

    "registries": { "@cybr": "https://cybr-ui.com/r/{name}.json" }
  2. 2. Add components:

    $ npx shadcn@latest add @cybr/hud-image-frame

If shadcn reports Unknown registry "@cybr", step 1 is missing from that project's components.json.

Preview

[IMAGE] · SCAN 38%

Props

Component props
PropTypeDefaultDescription
childrenReactNode—Media that fills the frame behind the overlays, such as an <img> or <video>. Images use object-fit: cover.
indexReactNode—Large outlined numeral at the bottom left. Decorative.
captionReactNode—Caption at the bottom right, rendered as the <figcaption>.
scanLinebooleantrueShows the static signal scan line at 38% height.
...propsComponentProps<"figure">—Every other native <figure> attribute is forwarded; className is merged last with cn(). Set height with min-h-*.

Usage

Needs the stylesheet from @cybr/tokens. After the install, import it in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
import Image from "next/image";

import { HudImageFrame } from "@/components/ui/hud-image-frame";

export function Feed() {
  return (
    <HudImageFrame index="01" caption="CAM 04 · SECTOR NINE">
      <Image src="/sector-nine.jpg" alt="Loading bay at night" fill />
    </HudImageFrame>
  );
}

Anatomy

Accessibility