Skip to content

    Browse components

    Foil Sweep

    A glossy band of light sweeps across the card on hover or focus, like light catching foil.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/foil-sweep

    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/foil-sweep.json

    Usage

    import { FoilSweep } from "@/components/ui/foil-sweep";
    
    <FoilSweep className="rounded-2xl">
      <Card />
    </FoilSweep>

    Props

    PropTypeDefaultDescription
    childrenReactNode—Card or element to shine.
    anglenumber-45Angle of the glare band in degrees.
    colorstring"#ffffff"Glare color.
    opacitynumber0.5Peak opacity of the glare.
    sizenumber20Band width, % of the sweep.
    durationnumber800Ms for one sweep.
    playOncebooleanfalseSweep only on enter; skip the return sweep on leave.
    classNamestring—Extra classes for the root element.