Reticle preview

Interactive preview of the CyberSpec Reticle component. A lock-on bracket that snaps onto whatever it wraps when hovered, focused or active.

About this preview

Reticle belongs to the HUD group in the CyberSpec catalog. It uses markup and CSS.

Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

bunx --bun shadcn@latest add https://www.cyberspec.dev/r/reticle.json

Example

"use client"

import { Radio, Satellite } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Reticle } from "@/components/ui/reticle"

export default function ReticleDemo() {
  return (
    <div style={{ display: "flex", flexWrap: "wrap", justifyContent: "center", gap: "30px 28px", paddingBlock: 14 }}>
      <Reticle active tag="Lock">
        <Button tone="ghost">
          <Satellite aria-hidden />
          Relay 07
        </Button>
      </Reticle>
      <Reticle tag="Track" tagAt="bottom-end">
        <Button tone="ghost">
          <Radio aria-hidden />
          Relay 12
        </Button>
      </Reticle>
    </div>
  )
}

Install this example

bunx --bun shadcn@latest add https://www.cyberspec.dev/r/reticle-demo.json

Resources

View as Markdown