Skip to content
VenusUI
Get started

Rolodex

A rotary card file that tumbles through contacts by scroll, drag, keys or letter tabs.

Preview

Installation

npx shadcn@latest add @venusui/rolodex

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/rolodex.tsx

Usage

The code behind the preview above.

rolodex-demo.tsx

import { Rolodex } from "@/components/ui/rolodex"

export default function RolodexDemo() {
  return (
    <Rolodex
      cards={[
        { name: "Amara Diallo", role: "Radio producer", phone: "+1 555 0142", email: "amara@example.com" },
        { name: "Elias Brandt", role: "Lighthouse keeper", phone: "+1 555 0188", note: "Call after the storm" },
        { name: "Hugo Martin", role: "Master baker", email: "hugo@example.com" },
        { name: "Lena Okafor", role: "Oceanographer", phone: "+1 555 0127", email: "lena@example.com" },
        { name: "Noor Rahman", role: "Piano tuner", phone: "+1 555 0163" },
        { name: "Sofia Lindgren", role: "Glacier guide", email: "sofia@example.com" },
      ]}
    />
  )
}

API reference

PropTypeDefaultDescription
cards{ name: string; role?: string; phone?: string; email?: string; note?: string }[]—Cards, in the order you want them.
defaultIndexnumber0Card shown first.
onCardChange(card, index) => void—Called when the front card changes.

All <div> props.

Requirements

  • lucide-react for icons. React 19 and Tailwind CSS v4.

Customization

  • Sort cards alphabetically so the letter tabs read in order.

Accessibility

  • The drum is focusable and turns with the up and down arrow keys; the current card is announced.
  • Only the front card’s links can be focused.

Troubleshooting

Something looks different from the preview.
Components use your project’s theme tokens, so surrounding colours and radius follow your styles.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

Analog Clock

Data display

A station clock whose needle waits at twelve; drag the minute hand to set it by hand.

Loading preview

Bookshelf

Interactive

Books on a wooden shelf whose spines lift on hover and pull out when selected, with a matching cover.

Loading preview

Chat Thread

Data display

A messaging conversation that plays out with typing indicators; viewers can send replies too.