Polaroid Develop, animated React component
An instant photo you develop by dragging and shaking it: the faster it moves, the quicker the grey haze clears and the colour comes through. It swings with the drag velocity, develops slowly on its own, and writes a handwritten caption once it is done.
- Pro
- Cards
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Grab it and shake.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| src | string | — | Photo to develop. Without it the drawn scenes are shown. |
| alt | string | "" | Alt text for src. |
| caption | string | — | Handwritten caption for src once developed. Drawn scenes carry their own. |
| scenes | PolaroidScene[] | DEFAULT_POLAROID_SCENES | Drawn scenes cycled by New photo, each { sky, sea, sun, land, caption }. |
| onDeveloped | (caption: string) => void | — | Called when the photo finishes developing, with its caption (or alt). |
| autoplay | boolean | false | Shakes the photo by itself and swaps to a new one until someone touches it. |
| className | string | — | Extra classes for the root. |