Neon Rain
Carousel
moleculesOne slide at a time from any array: prev/next, dots, a counter, swipe, ←/→ and Home/End, optional loop and autoplay that pauses on hover and focus.
Featured albums
slides is any array, slide is a snippet of (item, index); bind:index, dots and counter.
Controls, dots and autoplay
dots={false}, controls={false} with counter, and loop + autoplay (ms) that pauses on hover and focus.
States
a single slide disables both arrows; a tall slide sets the height; onchange reports the new index.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
slides required | T[] | — | One entry per panel. Entries may themselves be snippets when no `slide` renderer is given. |
slide | Snippet<[T, number]> | — | Renders one panel from its entry and position. |
index bindable | number | 0 | Active panel; bindable. Clamped (or wrapped with `loop`) into range. |
onchange | (index: number) => void | — | |
loop | boolean | false | Wrap from the last panel to the first and back. |
autoplay | number | 0 | Milliseconds between automatic advances. `0` (default) disables it. When on, rotation pauses on hover and focus and a play/pause control appears. |
dots | boolean | true | |
controls | boolean | true | |
counter | boolean | false | Show an `N / M` position counter. |
label | string | 'Carousel' | |
class | string | '' | |
style | string | '' | |
slideClass | string | '' |