Flutter docs
Default skin

Carousel

A set of carousel areas.

When to use

  • When there is a group of content on the same level.
  • When there is insufficient content space, it can be used to save space in the form of a revolving door.
  • Commonly used for a group of pictures/cards.

Examples

API

Carousel are exported from @ceebee/ui/client.

Carousel

PropertyDescriptionTypeDefaultVersion
arrowsWhether to show switch arrowsbooleanfalse5.17.0
autoplayWhether to scroll automatically, you can specify autoplay={{ dotDuration: true }} to display the progress barboolean | { dotDuration?: boolean }falsedotDuration: 5.24.0
autoplaySpeedDelay between each auto scroll (in milliseconds)number3000—
adaptiveHeightAdjust the slide's height automaticallybooleanfalse—
dotPlacementThe position of the dots, which can be one of top bottom start endstringbottom—
dotPositionThe position of the dots, which can be one of top bottom left right start end, Please use dotPlacement insteadstringbottom—
dotsWhether to show the dots at the bottom of the gallery, object for dotsClassboolean | { className?: string }true—
draggableEnable scrollable via dragging on desktopbooleanfalse—
fadeWhether to use fade transitionbooleanfalse—
infiniteInfinitely wrap around contentsbooleantrue—
speedAnimation speed in millisecondsnumber500—
easingTransition interpolation function namestringlinear—
effectTransition effectscrollx | fadescrollx—
afterChangeCallback function called after the current index changes(current: number) => void-—
beforeChangeCallback function called before the current index changes(current: number, next: number) => void-—
waitForAnimateWhether to wait for the animation when switchingbooleanfalse—
goTo(slideNumber, dontAnimate)Go to slide index, if dontAnimate=true, it happens without animation———
next()Change current slide to next slide———
prev()Change current slide to previous slide———