Skip to content
VenusUI
Get started

Film Strip

A strip of 35mm negatives; picking a frame develops it into a print above the strip.

Preview

Installation

npx shadcn@latest add @venusui/film-strip

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/film-strip.tsx

Usage

The code behind the preview above.

film-strip-demo.tsx

import { FilmStrip } from "@/components/ui/film-strip"

// Photos: Unsplash (free under the Unsplash License).
const photo = (id: string) => `https://images.unsplash.com/photo-${id}?w=900&h=600&fit=crop&auto=format&q=75`

export default function FilmStripDemo() {
  return (
    <FilmStrip
      frames={[
        { src: photo("1506905925346-21bda4d32df4"), alt: "Snowy peaks above a sea of cloud", caption: "Above the inversion" },
        { src: photo("1464822759023-fed622ff2c3b"), alt: "A wide valley below snow-capped mountains", caption: "The long valley" },
        { src: photo("1501785888041-af3ef285b470"), alt: "Rowing boats on a turquoise lake", caption: "Far shore" },
        { src: photo("1531366936337-7c912a4589a7"), alt: "Northern lights over snow", caption: "Past midnight" },
        { src: photo("1476610182048-b716b8518aae"), alt: "A waterfall over green cliffs", caption: "After the rain" },
      ]}
    />
  )
}

API reference

PropTypeDefaultDescription
frames{ src: string; alt: string; caption?: string }[]—The photos on the roll.
defaultIndexnumber0Frame developed at first.
stockstring"SAFETY FILM 400"Text along the film edge.
onSelect(index: number) => void—Called when a frame is picked.

All <div> props.

Requirements

  • React 19 and Tailwind CSS v4.

Customization

  • Frames work best at 3:2. Change stock to print your own film name.

Accessibility

  • Frames are buttons with the photo’s description; the left and right arrow keys move between them.
  • The caption of the print is announced when it changes.

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

A card that tilts in 3D toward the pointer with spring physics.

Loading preview

A flight boarding pass with a perforated stub and code that flips to the fare and baggage details.

Loading preview

Stacked cards with the next ones peeking out; Next sends the top card to the back.