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.

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.

Arc fan

Use effect="arc" for a curved fan of portrait cards. The active card stays upright while neighboring cards tilt and fade with distance. The shared navigation, dragging, disabled items and autoplay behavior still apply. Use caption for the active title, description and actions. Example photography comes from Kobra’s public Carousel preview.

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.

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.

Fade

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

External control

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

API

PROPS

Property
Type
Values
Description
default
Example
More
v-model
Number
slide index
Active slide index.
0
—
items
[]
{ name?label?src?alt?title?description?disabled?...customData }[]
Slide data. Extra business fields are forwarded to the item slot.
[]
—
height
Number | String
CSS height
Carousel height.
260
—
radius
Boolean | Number | String
true / false / CSS length
Shared radius for the viewport and every slide; false uses square corners.
true
—
effect
String
slide / fade / deck / orbit / prism / arc
Transition presentation. Arc arranges portrait cards on a curved fan with a separate active caption. Deck, orbit, and prism use CSS 3D perspective.
slide
—
direction
String
horizontal / vertical
Slide and control direction.
horizontal
—
autoplay
Boolean
true / false
Automatically advance slides.
true
—
interval
Number
milliseconds
Autoplay interval.
4000
—
loop
Boolean
true / false
Wrap navigation at both ends.
true
—
pause-on-hover
Boolean
true / false
Pause autoplay while pointer is over the carousel.
true
—
arrow
String
always / hover / never
Arrow visibility behavior.
hover
—
indicator-position
String
inside / outside / top / bottom / left / right / none
Indicator placement.
inside
—
indicator-type
String
dot / line / number
Indicator presentation.
line
—
trigger
String
click / hover
Indicator activation trigger. Click remains available for accessibility.
click
—
transition-duration
Number
milliseconds
Transition duration shared by every effect.
480
—
easing
String
CSS timing function
Transition interpolation function.
cubic-bezier(.22, .72, 0, 1)
—
deck-scale
Number
0 - 1
Scale of the first inactive layer in deck mode.
0.86
—
deck-visible
Number
1 - 4
Maximum inactive card layers visible on each side in deck mode.
2
—
deck-blur
Boolean
true / false
Blur inactive deck cards progressively by distance.
false
—
perspective
Number
pixels
3D camera perspective and Z-axis distance.
1200
—
depth
Number
pixels
3D camera perspective and Z-axis distance.
150
—
orbit-angle
Number
0 / 12 - 120
Angular spacing in orbit mode; 0 distributes rendered items evenly around the full circle.
0
—
orbit-max-visible
Number
integer≥ 4
Base 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-blur
Boolean
true / false
Adds a short motion blur during transitions.
false
—
draggable
Boolean
true
Enable mouse dragging and touch swiping.
false
—
touchable
Boolean
false
Enable mouse dragging and touch swiping.
true
—
keyboard
Boolean
true / false
Enable arrow, Home, and End keyboard navigation.
true
—

EVENTS

Event
Type
Description
default
Example
More
before-change
—
Fired with next and previous indexes before state changes.
—
—
change
—
Fired with current and previous indexes when state changes.
—
—
after-change
—
Fired after the configured transition duration.
—
—

SLOTS

Slot
Scope
Description
default
Example
More
caption
{ item: ; index: number }
Active-item caption and actions below an arc fan. Defaults to the item's title and description.
—
item
{ item: ; index: number; active: boolean; offset: number }
Custom slide content. Receives item, index, active, and relative offset.
—
—
prev
{ disabled: boolean }
Custom arrow content. Receives disabled.
—
—
next
{ disabled: boolean }
Custom arrow content. Receives disabled.
—
—
indicator
{ item: ; index: number; active: boolean }
Custom indicator content. Receives item, index, and active.
—
—

EXPOSES

Method
Type
Description
default
Example
More
activeIndex
—
Readonly active slide index ref.
—
—
setActiveItem(index | name)
—
Switch to a slide by index or item name.
—
—
prev
—
Switch to the previous or next enabled slide.
—
—
next
—
Switch to the previous or next enabled slide.
—
—
play
—
Resume or pause autoplay imperatively.
—
—
pause
—
Resume or pause autoplay imperatively.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied