The example below also does not include the data-bs-ride attribute and has data-bs-interval="false" so it doesn’t autoplay.
This can be disabled using the data-bs-touch attribute. Previous Next Disable touch swipingĬarousels support swiping left/right on touchscreen devices to move between slides. carousel-item to change the amount of time to delay between automatically cycling to the next item. carousel-item intervalĪdd data-bs-interval="" to a. carousel-fade to your carousel to animate slides with a fade transition instead of a slide. Third slide label Some representative placeholder content for the third slide. Second slide label Some representative placeholder content for the second slide. First slide label Some representative placeholder content for the first slide. d-none and bring them back on medium-sized devices with. They can be easily hidden on smaller viewports, as shown below, with optional display utilities.
Previous Next With captionsĪdd captions to your slides easily with the. You can also add the indicators to the carousel, alongside the controls, too. w-100 on carousel images to prevent browser default image alignment.
Control and indicator elements must have a data-bs-target attribute (or href for links) that matches the id of the. carousel for optional controls, especially if you’re using multiple carousels on a single page. active class needs to be added to one of the slides otherwise the carousel will not be visible. While carousels support previous/next controls and indicators, they’re not explicitly required. As such, you may need to use additional utilities or custom styles to appropriately size content. ExampleĬarousels don’t automatically normalize slide dimensions. Please be aware that nested carousels are not supported, and carousels are generally not compliant with accessibility standards. See the reduced motion section of our accessibility documentation. The animation effect of this component is dependent on the prefers-reduced-motion media query.