Cloth Button

NewPremium

Button surface simulates fabric using verlet integration physics. Cursor pushes dents into the cloth mesh.

buttonsphysicsclothverletfabricinteractive

Installation

Terminalbash
npx motioncraft add cloth-button

Usage

cloth-button.tsxtsx
import { ClothButton } from "@/components/buttons/premium-buttons";

<ClothButton meshColor="rgba(99, 102, 241, 0.5)">
  Touch Me
</ClothButton>

Props

PropTypeDefaultDescription
children*ReactNodeButton content
meshColorstringrgba(255, 255, 255, 0.4)Mesh line color
classNamestringAdditional CSS classes
onClick() => voidClick handler

Related Components