@extends('layouts.vertical', ['subtitle' => 'Carousel']) @section('content') @include('layouts.partials/page-title', ['title' => 'Base UI', 'subtitle' => 'Carousel'])
Here’s a carousel with slides only. Note the presence of the .d-block and
.img-fluid on
carousel images to prevent browser default image alignment.
Adding in the previous and next controls:
You can also add the indicators to the carousel, alongside the controls, too.
Add captions to your slides easily with the .carousel-caption
element within any .carousel-item. They can be easily hidden on smaller viewports, as
shown below, with optional display utilities. We hide them initially with .d-none and
bring them back on medium-sized devices with .d-md-block.
Add .carousel-fade to your carousel to animate slides with a fade
transition instead of a slide. Depending on your carousel content (e.g., text only slides), you may
want to add .bg-body or some custom CSS to the .carousel-items for proper
crossfading.
.carousel-item interval
Add data-bs-interval="" to a .carousel-item to
change the amount of time to delay between automatically cycling to the next item.
.carousel-item interval
Carousels support swiping left/right on touchscreen devices to move between
slides. This can be disabled using the data-bs-touch attribute. The example below also
does not include the data-bs-ride attribute so it doesn’t autoplay.
.carousel-item interval
Add .carousel-dark to the .carousel 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.