Docs Platform

Carousel

A slide index. The machine owns index, loop, and slide count. There is no autoplay. Previous/next wrap only when loop is on.

Live machine

The shipped carouselMachine running through createService with four slides, loop off. Note what the ends do: PREV at slide 1 and NEXT at slide 4 clamp — the transition list shows them as self-transitions rather than pretending they wrap.

carousel · live via createService

States · walked from the machine

active

Transitions from here · click to send

Context

{
  "mode": "uncontrolled",
  "index": 1
}

Log · newest first

No events yet — use the component above or send a transition.

Explore the layers

Machine (@grassroot/ui-machines/carousel). Headless: five adapters plus mountCarousel. Spec: packages/ui-headless/core/src/carousel/carousel.spec.md.

Behaviour contract

Arrow keys move the index. Svelte headless Root does not $bindable-adopt the index.