Skip to content

    Browse components

    Cursor Highlight

    A soft glow follows the cursor and springs into a pill that wraps whatever link or card you hover.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/cursor-highlight

    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/cursor-highlight.json

    Usage

    import { CursorHighlight } from "@/components/ui/cursor-highlight";
    
    <CursorHighlight>
      <nav className="flex gap-2">
        <a href="/">Home</a>
        <a href="/docs">Docs</a>
      </nav>
    </CursorHighlight>

    Props

    PropTypeDefaultDescription
    childrenReactNode—Links, buttons or tiles to highlight.
    selectorstring"[data-highlight], a, button"Elements the highlight snaps to.
    colorstring"#c6ff3d"Highlight color.
    opacitynumber0.16Peak opacity of the highlight.
    blobSizenumber90Diameter of the free-floating blob in px.
    paddingnumber4Px the highlight extends past a hovered element.
    radiusnumber12Corner radius when wrapped around an element, in px.
    stiffnessnumber0.2Spring stiffness. Higher = snappier.
    classNamestring—Extra classes for the root element.