Skip to content

    Browse components

    Pixel Highlight

    Hovering or focusing fills the element with twinkling pixels that ripple out from the pointer, and ripple away on leave.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/pixel-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/pixel-highlight.json

    Usage

    import { PixelHighlight } from "@/components/ui/pixel-highlight";
    
    <PixelHighlight className="rounded-2xl border p-6">
      <h3>Hover me</h3>
    </PixelHighlight>

    Props

    PropTypeDefaultDescription
    childrenReactNode—Element to highlight.
    colorsstring[]["#c6ff3d","#86efac","#22d3ee"]Pixel colors.
    gapnumber7Px between pixel centers.
    speednumber900Ripple speed in px per second.
    twinklenumber0.5Twinkle strength while lit.
    classNamestring—Extra classes for the root element.