Playground GitHub npm

Reticle

Crosshair overlay — 4 ticks + optional center dot.

ui hud

Preview

Installation

npx slintcn@latest add reticle

Usage

import { Reticle } from "slintcn/components/reticle.slint";

Reticle {
    size: 28px;
    tint: #fafafa;
    stroke-width: 2px;
    tick-length: 8px;
    gap: 6px;
    show-center: true;
}

Properties

size in length

Outer diameter / span of the reticle.

tint in color

Stroke color of the ticks + dot.

stroke-width in length

Width of each tick bar.

tick-length in length

Length of each individual tick.

gap in length

Gap between the center and each tick (lets the focal point breathe).

show-center in bool

Render a small center dot if true.

API

Accessibility
focusableno

Dependencies

theme only

Installed automatically as transitive dependencies of slintcn add reticle.