Cloth Banner, animated React component
An announcement printed on cloth and pinned to a rail by five pins. It sways in the breeze and drapes under your hand; yank it down hard and the pins pop one by one until it drops away, or press Dismiss to let it fall.
- Pro
- CTA Sections
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Pull it down hard to dismiss.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| title | string | "Launch Week" | Big line printed on the cloth. |
| subtitle | string | "Oct 27–31 · five drops, one a day" | Smaller line printed under the title. |
| from | string | "#0071e3" | Gradient start colour of the cloth (top left). |
| to | string | "#5e5ce6" | Gradient end colour of the cloth (bottom right). |
| onDismiss | () => void | — | Called once the banner has dropped away, whether it was yanked down or dismissed with the button. |
| autoplay | boolean | false | Sends a gust of wind every 2.2s until someone grabs the cloth or presses a button. Off when reduced motion is preferred. |