Skip to content

    Browse components

    Lock On

    A spinning reticle cursor whose corner brackets snap around any element you mark as a target.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/lock-on

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/lock-on.json

    Usage

    import { LockOn } from "@/components/ui/lock-on";
    
    <LockOn className="h-96">
      <button data-cursor-target>Hover me</button>
    </LockOn>

    Props

    PropTypeDefaultDescription
    childrenReactNode—Content. Mark targets with data-cursor-target.
    targetSelectorstring"[data-cursor-target]"Elements matching this selector get wrapped by the brackets.
    colorstring"#ffffff"Reticle color.
    spinSpeednumber120Degrees per second the idle reticle spins.
    sizenumber34Idle reticle size in px.
    paddingnumber8Px between a target and the brackets.
    hideCursorbooleantrueHide the system cursor inside the container (mouse only).
    classNamestring—Extra classes for the root element.