Browse components
Cloth Wire
A wireframe mesh that stretches around the cursor like cloth and springs back; click to send a shockwave.
Cloth Wire
Installation
npx shadcn@latest add @glint-ui/cloth-wireFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/cloth-wire.json
Usage
import { ClothWire } from "@/components/ui/cloth-wire";
<div className="relative h-96">
<ClothWire spacing={34} />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| spacing | number | 34 | Px between mesh points. |
| radius | number | 170 | Px radius the cursor bends. |
| strength | number | 1 | Cursor force multiplier. |
| stiffness | number | 0.05 | Pull back toward rest. Higher = snappier. |
| damping | number | 0.88 | Velocity kept per frame. Higher = wobblier. |
| mode | "push" | "pull" | "push" | Push the mesh away from the cursor or pull it in. |
| lineColor | string | "#34343c" | Idle line color. |
| activeColor | string | "#c6ff3d" | Color of stretched lines. |
| className | string | — | Extra classes for the root element. |