
Images · Free
Record flow
Pictures in a dark tray in real 3D, like records in a crate: drag or flick through them, a row or a column, square or wide cards.
Free on Gumroad: the download arrives in your inbox.
Details
- Category
- Images
- Plan
- Free
- Code
- React + Tailwind, TypeScript · 311 lines
- Files
- RecordFlow.tsx
- Needs
- React and Tailwind only
- Agents
- MCP server and shadcn registry
About
Pictures in a dark tray, in real 3D. The one in the middle faces you, big, with its title; the others stand turned to either side, each tucked behind the next, fading into the dark, like records in a crate.
Drag and the row follows your finger exactly; flick it and it carries on a card or two, then settles. At rest the cards float, each at its own pace. Point at the one in front and it gives under the pointer, a dent where you press and light on the far edge. Press it and it comes forward while the rest step back; press a side card and it comes to the middle.
It runs as a row or as a column, with square cards or wide ones.
React + Tailwind, no other libraries.
Install
With the shadcn CLI:
npx shadcn@latest add https://www.stackd.codes/r/record-flow.jsonOr let your agent add it through the StackD MCP server:
claude mcp add --transport http stackd https://www.stackd.codes/mcpPrompt for your agent
Paste it into Claude Code, Cursor, Codex or VS Code once the MCP server is connected.
Add the StackD Record flow component to this project. Use the StackD MCP server: call get_component with { "name": "record-flow" }, write the files at the paths it gives and install any npm packages it lists. Then use it where it fits, following its README for the props, and keep its own styles.Use
- Copy
RecordFlow.tsxinto your project (for examplecomponents/). - Use it:
import { RecordFlow, type FlowPicture } from './components/RecordFlow'
const pictures: FlowPicture[] = [
{ src: '/photos/1.jpg', title: 'Grey terraces', credit: 'Fabian Bächli' },
{ src: '/photos/2.jpg', title: 'White blocks', credit: 'Joel Filipe' },
{ src: '/photos/3.jpg', title: 'Swirl', credit: 'Joakim Nådell' },
]
<RecordFlow images={pictures} onChange={(picture, i) => console.log(picture.title, i)} />
// A column
<RecordFlow images={pictures} direction="vertical" />
// Wide cards, for screens or landscape photos
<RecordFlow images={pictures} width={1000} height={560} aspect={1.55} share={0.6} />
Use your own pictures: the photos in the store's demo come from Unsplash and are not included.
In Next.js the file already starts with 'use client'. In other React setups that line does nothing.
Options
| Prop | Default | What it does |
|---|---|---|
images | { src, title, credit? }. The title and credit show on the card in front | |
direction | 'horizontal' | 'horizontal' (a row) or 'vertical' (a column) |
width / height | 820 / 440 (a column: 420 / 720) | Size of the tray in px |
start | the middle one | The picture that starts in front |
aspect | 1 | Card width ÷ height: 1 is square, about 1.5 for wide pictures |
share | 0.42 | How much of the row the card in front can take, 0 to 1 |
float | 40 | How much the cards float at rest, 0 (still) to 100 |
sink | 50 | How deep the card in front gives under the pointer, 0 to 100 |
onChange | Called with the picture and its index when one comes to the middle | |
className | Extra classes |
Accessibility
The tray is a carousel ("Pictures, 3 of 8") that you reach with Tab. The arrow keys move through it (left and right in a row, up and down in a column), Enter or Space brings the front picture forward and Escape sends it back. The picture in front is announced with its title and credit. A mouse wheel or trackpad scrolls through it too. With reduced motion on, nothing floats and the cards move without springing.
Colours from StackD
White #FFFFFF · Ink #141310 · Tray #0B0A09 · Wine #901919 · Olive #6C8544 · Ochre #BE9344
Licence
You can use it in personal and commercial projects. Don't resell or share the component on its own.
