Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Screenshot Carousel

ProNew

Screenshots in a row that scrolls and snaps like an app store listing, with the middle one in focus, a caption that follows it, arrows and dots.

Installation

pnpm dlx shadcn@latest add @viewport/screenshot-carousel

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
slides*{ id: string; content: React.ReactNode; caption: string }[]

One slide per screenshot. `content` is the picture or a framed device; `caption` says what it shows.

—
labelstring

Accessible name, e.g. "Screenshots of the app".

"Screenshots"
slideWidthstring

How wide a slide is, as a fixed CSS length such as "12rem". Narrower slides let more of their neighbors show.

"12rem"
classNamestring—

Accessibility

  • Native scrolling: swipe, trackpad and arrow keys work without script.
  • Each slide is named with its position and caption.
  • The caption is announced as the slide changes.
  • Arrows disable at the ends; dots have full-size targets.
  • Buttons jump instead of gliding under reduced motion.