Skip to content

    Browse components

    Tile Smear

    An image on a grid of tiles that smear along with the cursor and ease back into place.

    Tile Smear

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/tile-smear

    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/tile-smear.json

    Usage

    import { TileSmear } from "@/components/ui/tile-smear";
    
    <div className="relative h-96">
      <TileSmear imageSrc="/photo.jpg" grid={15} />
    </div>

    Props

    PropTypeDefaultDescription
    imageSrcstring"https://picsum.photos/seed/glint-1/1600/1000"Image URL (must allow CORS).
    gridnumber15Grid cells per side.
    mouseRadiusnumber0.18Cursor influence radius (fraction of height).
    strengthnumber1How far cells get dragged.
    relaxationnumber0.92Easing back to rest; higher is slower.
    classNamestring—Extra classes for the root element.