Tape Shelf, animated React component
Cassette cases stand spine-out on a tilted 3D shelf. Hovering slides one up; picking one swings it round to show its cover with the reels turning, while the rest of the shelf steps aside and dims.
- Pro
- 3D Components
- Hover
- 3D
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Pick a tape from the shelf.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| tapes | ShelfTape[] | DEFAULT_TAPES | Cases on the shelf, left to right: title, artist, color (spine and label) and ink (text colour on them). |
| onPick | (index: number | null) => void | — | Called with the picked index when someone picks a tape, or null when it goes back. |
| autoplay | boolean | false | Pulls out the 3rd, 6th and 1st tapes in turn, putting each back, every 1.8s until someone touches the shelf. |