About
A portfolio works section where a row of project posters hangs as cloth. Drag or scroll and every poster bends and flaps like a flag with its free edges trailing; the cursor ripples a poster as it passes and it settles flat again. The big title follows the poster in the middle, and an Index pill switches to a grid of the same work. Built on three.js with a small spring-cloth simulation per poster. Pass your own projects as props.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Cloth Works Gallery to your project and fits it to your theme.
Code
How Cloth Works Gallery is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client"
import ClothWorksGallery from "@/components/ui/cloth-works-gallery"
export default function Demo() {
return (
// width: 100% is load-bearing. 21st centres every demo in a flex wrapper,
// and a flex item left at width: auto shrinks a full-bleed section to a strip.
<main style={{ width: "100%" }}>
{/* autoPlay is for this unattended preview: the row drifts on its own until you drag it. */}
<ClothWorksGallery autoPlay />
</main>
)
}
















