Browse components
Tile Smear
An image on a grid of tiles that smear along with the cursor and ease back into place.
Tile Smear
Installation
npx shadcn@latest add @glint-ui/tile-smearFirst 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
| Prop | Type | Default | Description |
|---|---|---|---|
| imageSrc | string | "https://picsum.photos/seed/glint-1/1600/1000" | Image URL (must allow CORS). |
| grid | number | 15 | Grid cells per side. |
| mouseRadius | number | 0.18 | Cursor influence radius (fraction of height). |
| strength | number | 1 | How far cells get dragged. |
| relaxation | number | 0.92 | Easing back to rest; higher is slower. |
| className | string | — | Extra classes for the root element. |