Horizontally or vertically scrollable rail of slides with keyboard,
button, indicator, drag and autoplay navigation. One slide per page.
Pattern follows the WAI-ARIA carousel
pattern with role="region" + aria-roledescription="carousel";
indicators map 1:1 with slides as a tablist.
Soma owns the index, autoplay timer, drag gesture, keyboard nav
and orientation. Eidos adds chrome (variant / size / color) and
renders the prev/next triggers as eidos <Button iconOnly variant="ghost"> via
the canonical Button consumer pattern.
soma layout
soma drag
soma autoplay
soma imperative API
exposed via the api snippet prop — drive the carousel from external buttons
Slides visible at once (each Item basis = 100% / slidesPerView).
slidesToScroll
number
1
Slides advanced per next() / prev().
align
'start' | 'center' | 'end'
'start'
Alignment of active slide(s) within viewport.
gap
string (CSS length)
'0px'
Inline-axis gap between slides.
loop
boolean
false
Wrap at edges (also wraps autoplay).
dragEnabled
boolean
true
Allow pointer drag to scrub.
dragThreshold
number (0–1)
0.25
Release fraction past which next slide commits.
autoplay
boolean
false
Enable timer-driven advance.
autoplayDelay
number (ms)
4000
Interval in milliseconds.
playOnInit
boolean
true
Start the autoplay timer on mount.
pauseOnHover
boolean
true
Pause autoplay while hovered.
stopOnInteraction
boolean
false
Latch-stop after user clicks prev/next/indicator or drags.
stopOnFocusIn
boolean
true
Pause while focus is inside root.
stopOnMouseEnter
boolean
false
Pause while cursor over root (Embla parity).
stopOnLastSnap
boolean
false
Latch-stop when last snap reached (loop=false only).
disabled
boolean
false
Disable all navigation.
aria-label
string
—
Override accessible name (falls back to lang ref).
variant eidos
ControlVariant: 'surface' | 'outline' | 'ghost'
'surface'
Container chrome.
size eidos
'xs' | 'sm' | 'md' | 'lg' | 'xl'
'md'
Cascades to indicator + trigger size.
color eidos
ColorRole
'primary'
Indicator + focus accent.
block eidos
boolean
true
Stretch root inline-size to container.
verticalBlockSize eidos
string (CSS length)
'16rem'
Viewport block-size in vertical orientation.
Viewport · ItemGroup
Viewport is the overflow: hidden clipping
box. ItemGroup is the translatable strip whose
transform the provider drives. Both are pass-through —
no eidos-specific props.
Item
Prop
Type
Default
Description
index
number
required
0-based slide index. Used for aria-roledescription + indicator wiring.
children
Snippet<[{`{ index, isActive }`}]>
—
Slide body. Receives active flag for per-slide effects.
PrevTrigger · NextTrigger
Prop
Type
Default
Description
variant eidos
ControlVariant: 'surface' | 'outline' | 'ghost'
'ghost'
Button variant.
size eidos
'xs' | 'sm' | 'md' | 'lg' | 'xl'
cascades from Carousel
Button size override.
rounded eidos
ButtonRounded
'full'
Corner radius.
intent eidos
Intent
—
Evaluative intent.
color eidos
ColorRole
—
Hierarchical color (under intent='neutral').
iconOnly eidos
boolean
true
Square aspect, label sr-only.
icon eidos
Snippet
chevron
Override default arrow glyph.
child soma
Snippet
—
Bypass Button entirely; render custom element.
IndicatorGroup · Indicator
Prop
Type
Default
Description
index (Indicator)
number
required
0-based slide this indicator navigates to.
aria-label (Indicator)
string
—
Override accessible name; falls back to "Go to slide {`{n}`}".
Absolute-positioned over viewport edges; vertical flips to top/bottom.
[data-carousel-indicator][data-state='active']
eidos
Active indicator: accent fill + 2.25× inline-size stretch.
{/if}
{#if tab === 'a11y'}
Accessibility
Follows the APG carousel pattern.
The root is role="region" with aria-roledescription="carousel" +
an accessible name. Each slide is role="group" with
aria-roledescription="slide". Indicators form a
role="tablist" with role="tab" children.
Keyboard
Key
Action
ArrowRight / ArrowDown
Next slide.
ArrowLeft / ArrowUp
Previous slide.
Home
First slide.
End
Last slide.
Tab
Move focus through prev / next / indicators / inner slide controls.
pointer drag
Scrub between slides; commits when past dragThreshold.