carousel

Carousel

Scrolls slides sideways or up and down, with previous and next buttons, dots that jump to a slide and a bar that shows how far the shopper has scrolled.

States: Default, Focus

Parts

PartFileDoes
CarouselCarousel.vueGroups all parts of the carousel, which scrolls through items sideways.
CarouselContentCarouselContent.vueHolds the slides of the carousel in a scrollable row.
CarouselDotsCarouselDots.vueShows one dot per slide and lets the user jump to a slide.
CarouselItemCarouselItem.vueHolds the content of one slide in the carousel.
CarouselNextCarouselNext.vueLets the user scroll the carousel to the next slide.
CarouselPreviousCarouselPrevious.vueLets the user scroll the carousel to the previous slide.
CarouselProgressCarouselProgress.vueShows how far the user has scrolled through the carousel.

Anatomy

<Carousel>
  <CarouselContent>
    <CarouselItem />
  </CarouselContent>
  <CarouselPrevious />
  <CarouselNext />
  <CarouselDots />
</Carousel>

Styling

PartRecipe
Carouselfocus-ring
CarouselContentcarousel-content
CarouselDotscarousel-dots
CarouselDotscarousel-dot
CarouselItemcarousel-item
CarouselProgresscarousel-progress
CarouselProgresscarousel-progress-indicator

Install

Writes 10 files into components/ui/carousel/. For agents, npx @frontic/ui docs carousel prints this reference as markdown; the MCP server serves the same.

Installs with it
button
npm packages
@lucide/vue
@vueuse/core
class-variance-authority
embla-carousel-vue@9.0.0-rc04
reka-ui

Built from

API reference

CarouselContent CarouselContent.vue

CarouselDots CarouselDots.vue

CarouselItem CarouselItem.vue

CarouselNext CarouselNext.vue

CarouselPrevious CarouselPrevious.vue

CarouselProgress CarouselProgress.vue

Example
State