Carousel

Content carousel using TotalSlides + CarouselItem. Subcomponents auto-installed as dependencies.

Carousel uses a TotalSlides + <CarouselItem> API. Items are passed as direct children via <CarouselItem> — each item must declare TotalSlides so it can calculate its own width.

Installation

bash
shellui add carousel

carousel-item, carousel-content, carousel-previous, carousel-next, and carousel-dots are auto-installed as dependencies.

Usage

Basic (text/content)

Auto-play

API Reference

Parameter Type Default Description
TotalSlides int — Total number of slides
CurrentSlide int 0 Index of the currently visible slide
CurrentSlideChanged EventCallback<int> — Fires when the active slide changes
AutoPlay bool false Enables automatic slide advancement
AutoPlayInterval int 3000 Milliseconds between auto-advances
AspectRatio string? null CSS aspect-ratio value, e.g. "16/9", "21/9"
ShowDots bool false Show dot indicators below the carousel
Class string? null Additional CSS classes
ChildContent RenderFragment — CarouselItem children

<CarouselItem>

Parameter Type Default Description
TotalSlides int — Must match the parent Carousel.TotalSlides — used for width calculation
ChildContent RenderFragment — Slide content

Render previous/next arrow buttons. No parameters required.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.