Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-carousel.json --yes

Carousel

Pro

A strip of pictures that scroll sideways, two in view, with previous and next buttons, for a gallery or a product's photos, for React and Tailwind CSS. Part of Goop Pro.

Step the strip with the narrow controls at its edges (each hides at its end), or scroll it sideways; press a panel to open it large, and close it with Escape or the cross. The panels are colour blocks of our own standing in for photographs.

When to use

  • A strip of pictures that scroll sideways, two in view, with previous and next buttons, for a gallery or a product's photos.
  • Also called: slideshow or image slider.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Carousel on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-carousel.json --yes
PROMPT
Add the Goop Carousel to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { Carousel, CarouselItem } from '@/components/ui/goop/carousel';

const PHOTOS = [
  { id: 'desk', title: 'Front desk', src: '/photos/desk.jpg' },
  { id: 'visit', title: 'Home visit', src: '/photos/visit.jpg' },
  { id: 'library', title: 'Library day', src: '/photos/library.jpg' },
];

function SiteVisitPhotos({ onOpen }: { onOpen?: (id: string) => void }) {
  return (
    <Carousel aria-label="Site visit photos" previousLabel="Previous photo" nextLabel="Next photo">
      {PHOTOS.map((photo) => (
        <CarouselItem key={photo.id} buttonLabel={`Open ${photo.title}`} onClick={() => onOpen?.(photo.id)}>
          <img src={photo.src} alt={photo.title} className="aspect-3/2 w-full object-cover" />
        </CarouselItem>
      ))}
    </Carousel>
  );
}
  • Fits: record: header (media: primary).
  • height, width, padding, corner: add no class for these.

API reference

Options
OptionTypeWhat it does
previousLabel?string = 'Previous pictures'The previous control's name for a screen reader.
nextLabel?string = 'Next pictures'The next control's name for a screen reader.
positionLabel?(position: number, count: number) => stringThe words a screen reader is told when the strip moves ("2 of 5" by default).
Parts
PartWhat it is
CarouselItemOne picture of the strip; children: ReactNode — The picture, an img or your own, at the slide's width; buttonLabel?: string = 'Open picture' — The picture's button's spoken name, with onClick; onClick?: ComponentProps<'button'>['onClick'] — What a press on the picture does (open it large); without it, no button
  • data-slot values (to select a part by): carousel, carousel-cell, carousel-frame, carousel-item, carousel-item-button, carousel-next, carousel-next-icon, carousel-position, carousel-previous, carousel-previous-icon, carousel-track, carousel-viewport

Keyboard

KeyWhat it does
TabMove to each picture's button, then to the live arrows
Enter SpacePress the focused arrow or picture
ArrowLeft ArrowRightStep the strip one picture back or on, from anywhere in it, right to left mirrored
Home EndGlide the strip to the first or the last picture

Accessibility

  • The native element answers the keyboard.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/carousel.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-carousel.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.