Blazor Carousel

Blazor Carousel component is a slideshow component that cycles through elements, images, or slides of text.

Examples#

Here is a basic example of a carousel with three slides.

Indicators#

You can add indicators to the carousel, alongside the previous/next controls. The indicators allow users to jump directly to a particular slide. Set ShowIndicators to true to show the indicators.

Captions#

You can add captions to your slides with the CarouselCaption component within any CarouselItem. They can be easily hidden on smaller viewports.

Crossfade#

To animate slides with a fading transition instead of sliding, set Crossfade to true.

Autoplaying carousels#

You can make your carousels autoplay on page load by setting the Autoplay parameter to CarouselAutoPlay.StartOnPageLoad. Autoplaying carousels automatically pause while hovered with the mouse.
When the Autoplay parameter is set to CarouselAutoPlay.StartAfterUserInteraction, the carousel won’t automatically start to cycle on page load. Instead, it will only start after the first user interaction.
Add Interval parameter to a CarouselItem component to change the amount of time to delay between automatically cycling to the next item.

Autoplaying carousels without controls#

Hide the controls by setting ShowPreviousNextControls parameter to false.

Disable touch swiping#

Carousels support swiping left/right on touchscreen devices to move between slides. This can be disabled by setting the Touch option to false.

Events#

Blazor Bootstrap Carousel component exposes a two events for hooking into Carousel functionality.
Event Name Description
Onslide Fires immediately when the slide instance method is invoked.
Onslid Fired when the carousel has completed its slide transition.
NOTE: All of the images were generated using Microsoft Designer.