Skip to content

    Browse components

    Cloth Wire

    A wireframe mesh that stretches around the cursor like cloth and springs back; click to send a shockwave.

    Cloth Wire

    Open
    Customize
    push
    pull

    Installation

    npx shadcn@latest add @glint-ui/cloth-wire

    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/cloth-wire.json

    Usage

    import { ClothWire } from "@/components/ui/cloth-wire";
    
    <div className="relative h-96">
      <ClothWire spacing={34} />
    </div>

    Props

    PropTypeDefaultDescription
    spacingnumber34Px between mesh points.
    radiusnumber170Px radius the cursor bends.
    strengthnumber1Cursor force multiplier.
    stiffnessnumber0.05Pull back toward rest. Higher = snappier.
    dampingnumber0.88Velocity kept per frame. Higher = wobblier.
    mode"push" | "pull""push"Push the mesh away from the cursor or pull it in.
    lineColorstring"#34343c"Idle line color.
    activeColorstring"#c6ff3d"Color of stretched lines.
    classNamestring—Extra classes for the root element.