# Reticle preview

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

[View Reticle preview on CyberSpec](https://www.cyberspec.dev/preview/reticle)

## 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.

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

## Example

```tsx
"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

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

## Resources

- [Reticle documentation](https://www.cyberspec.dev/components/sidebar/reticle.md)
- [Component catalog](https://www.cyberspec.dev/components.md)
- [Reticle source code](https://github.com/agnelnieves/cyberspec/blob/main/registry/cyber/ui/reticle.tsx)
- [Shadcn registry item](https://www.cyberspec.dev/r/reticle.json)
