React Carousel Component
Carousel
Limited offer ends 1st January 2025, use code 2024XMAS25 during checkout.
React carousel is a slideshow component for cycling through elements—images or slides of text—like a carousel.
Other Frameworks
CoreUI components are available as native Angular, Bootstrap (Vanilla JS), and Vue components. To learn more please visit the following pages.
How it works#
The React carousel is a slideshow for cycling within a group of content. It runs with a group of images, text, or html elements. It also incorporates support for previous/next buttons.
In browsers where the Page Visibility API is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc.).
Example#
Carousels don't automatically normalize slide dimensions. As such, you may want to use extra utilities or custom methods to properly size content. While carousels support previous/next controls and indicators, they're not explicitly expected. Add and customize as you see fit.
Slides only#
With controls#
Adding in the previous and next controls by controls
property.
With indicators#
You can attach the indicators to the carousel, lengthwise the controls, too.
With captions#
You can add captions to slides with the <CCarouselCaption>
element within any <CCarouselItem>
. They can be immediately hidden on smaller viewports, as shown below, with optional display utilities. We hide them with .d-none
and draw them back on medium-sized devices with .d-md-block
.
Crossfade#
Add transition="crossfade"
to your carousel to animate slides with a fade transition instead of a slide.
Dark variant#
Add dark
property to the CCarousel
for darker controls, indicators, and captions. Controls have been inverted from their default white fill with the filter
CSS property. Captions and controls have additional Sass variables that customize the color
and background-color
.
API#
Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here.