Use data attributes to easily control the position of the carousel. Placeholder Third slide Previous Next Previous Next Usage Via data attributes carousel-item to change the amount of time to delay between automatically cycling to the next item. carousel-item intervalĪdd data-interval="" to a. Placeholder Third slide Previous Next Previous Next Individual. carousel-fade to your carousel to animate slides with a fade transition instead of a slide. Third slide label Praesent commodo cursus magna, vel scelerisque nisl consectetur. Second slide label Lorem ipsum dolor sit amet, consectetur adipiscing elit. Previous Next First slide label Nulla vitae elit libero, a pharetra augue mollis interdum. Praesent commodo cursus magna, vel scelerisque nisl consectetur. 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. Placeholder Third slide Previous Next Previous Next With captionsĪdd captions to your slides easily with the. w-100 on carousel images to prevent browser default image alignment. Control and indicator elements must have a data-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. Lastly, if you’re building our JavaScript from source, it requires util.js. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |