Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
---
title: Rolodex Flip
description: Cycle a word through a list of values with a 3D rolodex card flip
component: rolodex-flip
vibe: tech
length: 110
useWhen:
- "Cycling package, feature, or value names inside a held line — install commands, \"works with X\" beats, plan-name cycling."
- "The canonical \"any component, same command\" bit."
avoidWhen:
- "The values are numbers with a counting narrative — use `number-wheel` or `rolling-number`."
- "Only two values swap once — `value-swap`, `shared-axis-y`, or `per-word-crossfade` is lighter."
- "The line reflows per value — the fixed sizer width shows a gap next to short values."
askedAs:
- "flipping cards cycle values"
- "3D card flip word swap"
- "I want a word in a sentence to flip through options like a rolodex"
- "cycle package names or integrations inside a fixed line"
- "works with beat showing different tools flipping into the slot"
- "viewer sees many choices rotate through one spot, install commands changing"
---
<ComponentPreview name="rolodex-flip" />
<InstallBlock name="rolodex-flip" />
## Usage
`RolodexFlip` renders an inline `span` and inherits the surrounding typography — drop it into the middle of a line and it flips through `items` while the rest of the line stays perfectly still: the outgoing value tips up and away, the incoming one turns in from below half a flip later, and an invisible sizer holds the width and baseline of the longest value. The first value is visible from the start and the last one stays for the rest of the scene.
```tsx
import { RolodexFlip } from "@/components/remocn/rolodex-flip";
export const MyScene = () => (
<span style={{ fontFamily: "monospace", fontSize: 36 }}>
$ npx shadcn add{" "}
<RolodexFlip items={["button", "dialog", "command", "tabs", "chart-area"]} />
</span>
);
```
## Sizing
The sizer uses the longest item by character count as real hidden text, so it works in any font. In a proportional font two equal-length strings can differ in width, so if your values are the same length put the visually widest one last — or anywhere, it just needs to be in the list.
`slot-machine-roll` and `number-wheel` are numeric reels, `per-word-crossfade` is a flat opacity swap, and `value-swap` slides values vertically at explicit frames — reach for `RolodexFlip` when arbitrary strings should cycle with physical depth at a fixed width.
<PropsTable title="Props"
rows={[
{
name: "items",
type: "string[]",
default: "—",
description: "Values shown in order. The last one stays.",
},
{
name: "from",
type: "number",
default: "0",
description: "Frame of the first flip.",
},
{
name: "interval",
type: "number",
default: "20",
description: "Frames each value holds before flipping.",
},
{
name: "flipDuration",
type: "number",
default: "10",
description: "Length of the flip itself in frames.",
},
{
name: "className",
type: "string",
default: "—",
description: "Passed to the wrapper span.",
},
{
name: "style",
type: "CSSProperties",
default: "—",
description: "Merged onto the wrapper span.",
},
]}
/>