Skip to content

    Browse components

    Bitmask Veil

    A flowing 1-bit ordered-dither veil that dissolves around the cursor to reveal what is underneath.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/bitmask-veil

    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/bitmask-veil.json

    Usage

    import { BitmaskVeil } from "@/components/ui/bitmask-veil";
    
    <BitmaskVeil className="h-96 rounded-2xl">
      <img src="/secret.jpg" alt="" className="size-full object-cover" />
    </BitmaskVeil>

    Props

    PropTypeDefaultDescription
    childrenReactNode—Content hidden under the veil.
    pixelSizenumber4Size of one dither pixel in px.
    colorstring"#0d0d0f"Veil base color.
    accentstring"#c6ff3d"Dithered highlight color.
    densitynumber0.4How much of the veil is highlight.
    radiusnumber150Px radius the cursor dissolves.
    healnumber1400Ms for a revealed patch to close again.
    speednumber1Flow speed of the veil pattern.
    classNamestring—Extra classes for the root element.