Fold Note, animated React component
A printed credit note you fold on its centre crease. Drag the right half over and it turns in 3D, shading as it goes and showing its patterned back; past halfway it snaps shut with a bounce, and a tap opens it again.
- Pro
- Cards
- 3D
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| title | string | "Store Credit" | Small caps heading printed top left. |
| amount | string | "50" | Denomination printed top right and, smaller, bottom right. |
| serial | string | "NOT LEGAL TENDER · SC 000042" | Fine print along the bottom edge. |
| backLabel | string | "Thanks" | Word printed on the back of the folding half. |
| onFoldChange | (folded: boolean) => void | undefined | Called with true when the note snaps shut and false when it opens. |
| autoplay | boolean | false | Folds and unfolds every two seconds until the user grabs or taps it. |