Skip to main content

Module carousel

Module carousel 

Source
Expand description

A scrolling row of slides with paging buttons, from carousel.css. A port of upstream’s carousel.ts.

Re-exports§

pub use Carousel_completions::Component::Carousel;
pub use Slide_completions::Component::Slide;

Structs§

CarouselProps
Properties for the Carousel component.
SlideProps
Properties for the Slide component.

Enums§

CarouselLayout
Carousel layouts.

Constants§

PAGE
How much of the visible width one press of a paging button moves: most of it, so the last visible slide becomes the first and the reader keeps their place.

Functions§

Carousel
A named region of slides that scrolls by touch, trackpad, and keyboard with no script; the previous and next buttons page it for everyone else and are aria-disabled at their end.
Slide
One slide, announced as “n of total”.
edges
Whether a track is at its start and at its end, from upstream’s edges. The offset is taken as an absolute value because scrollLeft runs negative in RTL.