BG-06Backgrounds
Drape Background
A pleated curtain in a breeze that you can push and pull, built with React, WebGL and a cloth simulation.
PRODither Reveal Hero and more like it are in Kokonut UI Pro
Installation
Drape Background is a free, open-source React component in the Kokonut UI Backgrounds collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/drape-background.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/drape-backgroundUsage
import DrapeBackground from "@/components/kokonutui/drape-background";
export default function Example() {
return <DrapeBackground />;
}Props
classNamestringExtra classes for the root element.
childrenReactNodeContent shown over the curtain. Pass null for a bare background.
windnumberDefault 1Strength of the breeze. 0 lets the curtain hang still.
pleatnumberDefault 34Depth of the pleats along the top, in px.
interactivebooleanDefault truePush the fabric with the cursor and grab it to drag it around.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.