Carousel

The ArcadiaCarousel component displays slides with navigation controls. Wrap each slide in an ArcadiaCarouselSlide.

Basic Usage

<ArcadiaCarousel @bind-ActiveIndex="slideIndex">
    <ArcadiaCarouselSlide>
        <h2>Slide 1</h2>
    </ArcadiaCarouselSlide>
    <ArcadiaCarouselSlide>
        <h2>Slide 2</h2>
    </ArcadiaCarouselSlide>
    <ArcadiaCarouselSlide>
        <h2>Slide 3</h2>
    </ArcadiaCarouselSlide>
</ArcadiaCarousel>

Auto-Play

<ArcadiaCarousel AutoPlay="true" AutoPlayInterval="3000" Loop="true">
    <ArcadiaCarouselSlide>Slide A</ArcadiaCarouselSlide>
    <ArcadiaCarouselSlide>Slide B</ArcadiaCarouselSlide>
</ArcadiaCarousel>

ArcadiaCarousel Parameters

ParameterTypeDefaultDescription
ActiveIndexint0Zero-based index of the currently active slide.
AutoPlayboolfalseWhether slides auto-advance.
AutoPlayIntervalint5000Auto-play interval in milliseconds.
ShowArrowsbooltrueWhether navigation arrows are displayed.
ShowDotsbooltrueWhether dot indicators are displayed.
LoopbooltrueWhether the carousel wraps from last to first slide.
ChildContentRenderFragment?nullThe carousel slide elements.
Classstring?nullAdditional CSS class names.
Stylestring?nullInline CSS styles.

ArcadiaCarousel Events

EventTypeDescription
ActiveIndexChangedEventCallback<int>Fired when the active slide index changes.

ArcadiaCarouselSlide Parameters

ParameterTypeDefaultDescription
ChildContentRenderFragment?nullContent for this slide.
Classstring?nullAdditional CSS class names.
Stylestring?nullInline CSS styles.

Accessibility

  • The carousel container uses role="region" with aria-roledescription="carousel".
  • Each slide uses role="tabpanel" with aria-roledescription="slide" and aria-hidden for inactive slides.
  • Arrow buttons use aria-label (“Previous slide” / “Next slide”).
  • Dot buttons use role="tab" with aria-selected and aria-label (“Go to slide N”).
  • Dots container uses role="tablist" with aria-label="Slide navigation".