Skip to content
THE COMPONENT LIBRARY
Skip to content

Carousels

Choose a carousel by the layout you need, then start from a small, accessible example. Every reference shares the same navigation, labels and named-part conventions.

Which carousel should I choose?

Start with Carousel when you need a complete gallery with autoplay. Choose a layout family when the visual arrangement is the point: each family shares one engine and focuses on composition.

Simple gallery with autoplay, pause, dots and controls

Carousel ↗

The smallest API. Start here when one carousel layout is enough.

A main image with a thumbnail rail

ThumbnailCarousel ↗

The selected slide and every thumbnail share one active index.

A centred cover with perspective neighbours

CoverflowCarousel ↗

Neighbours recede with scale, rotation and opacity.

A centred card with neighbours peeking

PeekCarousel ↗

A scroll-snap rail that keeps both sides visible.

A shallow fan of cards

ArcCarousel ↗

Cards spread along an arc and simplify on narrow screens.

An editorial rail of tilted cards

TiltedCarousel ↗

A swipeable rail with optional continuous scroll for decorative cards.

Several cards per page

MultiCarousel ↗

A scroll-snap rail that keeps column widths stable after filtering.

Simple or advanced? Carousel is the recommended entry point and owns autoplay, pause and the stable control contract. TiltedCarousel can continuously scroll decorative cards. The other layouts advance on user input. All references use the same keyboard model, slide labels and reduced-motion behaviour.

In the current workspace, single-slide galleries omit navigation. MultiCarousel also hides its navigation when all cards fit and restores it on overflow.

Minimal example

Three slides, one loop and no extra state. Every direct child becomes a slide; the built-in controls and dots are ready to use.

gallery.tsxtsx
import { Carousel } from "@pimolu/react";

const products = [
  { name: "Atlas", note: "One token contract for colour, type, spacing and radius." },
  { name: "Prism", note: "Six presets, light and dark, behind the same component API." },
  { name: "Signal", note: "Accessible primitives for dense product surfaces." },
];

export function Gallery() {
  return (
    <Carousel aria-label="Project highlights" loop>
      {products.map((product) => (
        <article
          key={product.name}
          className="grid min-h-40 content-end gap-2 rounded-[calc(var(--pimolu-radius-lg)+2px)] border border-border bg-surface p-6"
        >
          <h3>{product.name}</h3>
          <p className="text-sm text-muted">{product.note}</p>
        </article>
      ))}
    </Carousel>
  );
}

Browse the references

Each reference has its own live examples, customization guidance, generated API and source tests.

Carousel previewCarousel preview

Carousel ↗

The simple, batteries-included gallery with autoplay, pause, dots and controls.

ThumbnailCarousel previewThumbnailCarousel preview

ThumbnailCarousel ↗

A main stage with a thumbnail rail that shares one active index.

CoverflowCarousel previewCoverflowCarousel preview

CoverflowCarousel ↗

A centred card with scaled and rotated neighbours behind it.

PeekCarousel previewPeekCarousel preview

PeekCarousel ↗

A centred card with both neighbours peeking into the viewport.

StackCarousel previewStackCarousel preview

StackCarousel ↗

Cards stacked in a shallow deck behind the active one.

ArcCarousel previewArcCarousel preview

ArcCarousel ↗

A shallow arc of cards with rotation and vertical offset.

TiltedCarousel previewTiltedCarousel preview

TiltedCarousel ↗

A horizontal rail of separated, slightly tilted cards with optional continuous scroll.

MultiCarousel previewMultiCarousel preview

MultiCarousel ↗

Several cards per view on one shared scroll-snap track.