Carousel
Headless carousel built on CSS scroll-snap with multi-slide display and partial-slide peeking.
Usage
The Carousel provides slide navigation with native drag/swipe via CSS scroll-snap. Slides register with a step context for programmatic navigation.
Anatomy
<script setup lang="ts">
import { Carousel } from '@vuetify/v0'
</script>
<template>
<Carousel.Root>
<Carousel.Viewport>
<Carousel.Item />
</Carousel.Viewport>
<Carousel.Indicator />
<Carousel.Previous />
<Carousel.Next />
<Carousel.Progress />
<Carousel.LiveRegion />
</Carousel.Root>
</template>Examples
Alpine lakeSunsetDrag, or use the arrows and dots to browse. Press Play to auto-advance. Hovering the slides pauses it until the pointer leaves. Focusing or dragging stops it until you press Play again.
Recipes
Circular Navigation
Enable wrapping from last slide to first with the circular prop. The viewport then scrolls back to the first slide.
<template>
<Carousel.Root circular>
<Carousel.Viewport>
<Carousel.Item v-for="i in 5" :key="i" :value="i">
Slide {{ i }}
</Carousel.Item>
</Carousel.Viewport>
</Carousel.Root>
</template>Vertical Orientation
Set orientation="vertical" for a vertically scrolling carousel.
<template>
<Carousel.Root orientation="vertical">
<Carousel.Viewport style="height: 300px">
<Carousel.Item v-for="i in 5" :key="i" :value="i">
Slide {{ i }}
</Carousel.Item>
</Carousel.Viewport>
</Carousel.Root>
</template>Disabled State
Disable all navigation via the disabled prop on the root.
<template>
<Carousel.Root disabled>
<Carousel.Viewport>
<Carousel.Item v-for="i in 3" :key="i" :value="i">
Slide {{ i }}
</Carousel.Item>
</Carousel.Viewport>
<Carousel.Previous>Previous</Carousel.Previous>
<Carousel.Next>Next</Carousel.Next>
</Carousel.Root>
</template>Instant Scroll
Set behavior="instant" to disable smooth scrolling on programmatic navigation.
<template>
<Carousel.Root behavior="instant">
<Carousel.Viewport>
<Carousel.Item v-for="i in 5" :key="i" :value="i">
Slide {{ i }}
</Carousel.Item>
</Carousel.Viewport>
</Carousel.Root>
</template>Styling with Data Attributes
All component state is exposed via data-* attributes for CSS-only styling:
/* Style the selected slide */
[data-selected] { opacity: 1; }
/* Dim inactive slides */
[aria-hidden="true"] { opacity: 0.4; }
/* Hide nav buttons at boundaries */
[data-edge] { visibility: hidden; }
/* Drag interaction */
[data-dragging] { cursor: grabbing; user-select: none; }Accessibility
The Carousel implements the WAI-ARIA Carousel Pattern↗︎.
| Element | Role / Attribute |
|---|---|
| Root | role="region", aria-roledescription="carousel", aria-label, aria-disabled |
| Viewport | No ARIA of its own |
| Slide | role="group", aria-roledescription="slide", aria-label from the Carousel.slide locale string (Slide {current} of {size}) |
| Previous | aria-label defaults to "Previous slide" (Carousel.prev key, localizable), aria-controls links to viewport |
| Next | aria-label defaults to "Next slide" (Carousel.next key, localizable), aria-controls links to viewport |
| Indicator | role="tablist" container with aria-orientation, role="tab" per dot, aria-selected |
| Progress | role="progressbar", aria-valuenow, aria-valuemin, aria-valuemax |
| LiveRegion | role="status", aria-live="polite" while stopped and "off" while auto-rotating, aria-atomic |
Indicator dots use roving focus: Arrow Left/Right (Up/Down when vertical) move to and select the adjacent slide, and Home/End jump to the first and last. In a right-to-left context (dir="rtl" on the document or any ancestor), Arrow Left/Right are reversed so focus follows the visual order.
Slides outside the visible window are marked with aria-hidden="true" so screen readers only announce visible content. The LiveRegion provides a dedicated announcement channel for slide changes, using a 100ms delay for reliable screen reader detection.
FAQ
The per-view prop controls how many slides are visible at once. The Viewport measures its own layout (padding, gaps) from the DOM and computes each slide’s width automatically. It uses CSS scroll-snap so the browser handles all scroll physics and snap behavior natively.
The Carousel is built on CSS scroll-snap for native drag/swipe support. For fade transitions, use the Step provider component with Presence for mount/unmount animations — it gives you the same navigation model (next/prev/circular) without scroll-based layout.
Set autoplay to an interval in milliseconds. Nothing rotates until play() runs. Put that control first inside Carousel.Root so it is the first tab stop, and stop its click. Hovering the slides, arrows, dots, or progress pauses rotation until the pointer leaves. The play control still starts rotation while the pointer is on it. Moving keyboard focus into the carousel, or dragging a slide, calls stop(), and rotation stays stopped until play() runs again. pause() and resume() are still there when you want to hold the timer yourself. Use Carousel.Progress to visualize it.
<template>
<Carousel.Root v-slot="{ isAutoplay, play, stop }" :autoplay="5000">
<button type="button" @click.stop="isAutoplay ? stop() : play()">
{{ isAutoplay ? 'Stop slide rotation' : 'Start slide rotation' }}
</button>
<Carousel.Viewport>
<!-- slides -->
</Carousel.Viewport>
<Carousel.Progress class="h-1 bg-surface-variant" />
</Carousel.Root>
</template>


