Carousel

Swipeable slides with arrows, dots, looping and auto-play.

Installation

bash
shellui-native add carousel

Platforms: MAUI · Avalonia. Also installs icon.

Usage

Basic

Avalonia, running in your browser

MAUI and Avalonia

  • On Avalonia you drag slides with the mouse as well as with touch.
  • The Avalonia arrows are tab stops, and Left / Right change the slide while one has focus.
  • With AspectRatio="0", give the carousel a height: HeightRequest on MAUI, Height on Avalonia.

API

XAML children go to Slides.

Property Type Default Description
Position int 0 Index of the current slide. Two-way bindable.
Loop bool true At the last slide, Next wraps to the first (and Previous the other way).
ShowArrows bool true Shows the previous / next buttons.
ShowDots bool true Shows the position dots.
AutoPlay bool false Advances slides on a timer.
AutoPlayInterval int 3000 Milliseconds between slides while AutoPlay is on.
AspectRatio double 16 : 9 (1.7778) Width / height of the frame. 0 turns it off: set HeightRequest on the carousel instead.
Event Arguments Description
PositionChanged int User input only (arrows, dots, swipes, keys): auto-play, Next / Previous and setting Position from code don't raise it.
Method Description
Next() Shows the next slide.
Previous() Shows the previous slide.

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.