Carousel

Carousel with controlled state, deck layouts, spatial 3D effects, and accessible navigation.

Carousel

Default

Controlled index, autoplay, arrows, and line indicators use stable defaults.

Code copied

Card deck

deck owns the centered card and the inactive layers on both sides. Use deck-visible for the visible layer count and deck-blur for optional depth blur instead of maintaining several nearly identical effect types.

Code copied

Orbit stage

orbit uses a continuous phase to move a lower ring of compact cards smoothly around the Y axis. A separate, larger active card sits above the ring and changes with a short GPU-friendly crossfade. orbit-max-visible defaults to 10. When a larger data set would produce an even base window, the orbit takes one additional real card to form an odd ring. Every looping orbit keeps one hidden clone buffer at each edge: the outgoing card moves into the back and fades out while the matching buffer fades in from the other side, preventing a wrap teleport. Only when every real item already fits and no extra item is available does it render a decorative placeholder with a transparent interior and visible outline as that back-side portal. Fewer than four source items are cloned to fill the ring. Set a non-zero orbit-angle to override automatic spacing.

Code copied

Mirror prism

prism arranges three cards around one shared axis. Every face keeps a continuous rotation phase, so side cards move like one rigid prism instead of flipping independently. radius is shared by the viewport and every card; pass false for crisp prism faces.

Code copied

Fade

fade only transitions opacity. Enable motion-blur for a brief directional softening and compare both parameter states in the same example.

Code copied

External control

The exposed API supports named navigation and explicit playback control. Disabled items are skipped by arrows, autoplay, keyboard, and drag navigation.

Code copied

PROPS

PropertyTypeValuesDescriptiondefaultExampleMore
model-value / v-modelNumberslide indexActive slide index.0
itemsCarouselItem[]{ name?label?src?alt?title?description?disabled?...customData }[]Slide data. Extra business fields are forwarded to the item slot.[]
heightNumber | StringCSS heightCarousel height.260
radiusBoolean | Number | Stringtrue / false / CSS lengthShared radius for the viewport and every slide; false uses square corners.true
effectStringslide / fade / deck / orbit / prismTransition presentation. Deck, orbit, and prism use CSS 3D perspective.slide
directionStringhorizontal / verticalSlide and control direction.horizontal
autoplayBooleantrue / falseAutomatically advance slides.true
intervalNumbermillisecondsAutoplay interval.4000
loopBooleantrue / falseWrap navigation at both ends.true
pause-on-hoverBooleantrue / falsePause autoplay while pointer is over the carousel.true
arrowStringalways / hover / neverArrow visibility behavior.hover
indicator-positionStringinside / outside / top / bottom / left / right / noneIndicator placement.inside
indicator-typeStringdot / line / numberIndicator presentation.line
triggerStringclick / hoverIndicator activation trigger. Click remains available for accessibility.click
transition-durationNumbermillisecondsTransition duration shared by every effect.480
easingStringCSS timing functionTransition interpolation function.cubic-bezier(.22, .72, 0, 1)
deck-scaleNumber0 - 1Scale of the first inactive layer in deck mode.0.86
deck-visibleNumber1 - 4Maximum inactive card layers visible on each side in deck mode.2
deck-blurBooleantrue / falseBlur inactive deck cards progressively by distance.false
perspective / depthNumber / Numberpixels3D camera perspective and Z-axis distance.1200 / 150
orbit-angleNumber0 / 12 - 120Angular spacing in orbit mode; 0 distributes rendered items evenly around the full circle.0
orbit-max-visibleNumberinteger≥ 4Base visible card count. Auto spacing may take one extra real card to make an even window odd; larger data sets use hidden edge buffers.10
motion-blurBooleantrue / falseAdds a short motion blur during transitions.false
draggable / touchableBoolean / Booleantrue / falseEnable mouse dragging and touch swiping.false / true
keyboardBooleantrue / falseEnable arrow, Home, and End keyboard navigation.true
No matching data

SLOTS

PropertyTypeValuesDescriptiondefaultExampleMore
itemCustom slide content. Receives item, index, active, and relative offset.
prev / nextCustom arrow content. Receives disabled.
indicatorCustom indicator content. Receives item, index, and active.
No matching data

EVENTS

PropertyTypeValuesDescriptiondefaultExampleMore
before-changeFired with next and previous indexes before state changes.
changeFired with current and previous indexes when state changes.
after-changeFired after the configured transition duration.
No matching data

EXPOSES

PropertyTypeValuesDescriptiondefaultExampleMore
activeIndexReadonly active slide index ref.
setActiveItem(index | name)Switch to a slide by index or item name.
prev / nextSwitch to the previous or next enabled slide.
play / pauseResume or pause autoplay imperatively.
No matching data
Last Updated: 2026-08-17, 08:33:54