diff --git a/site/content/docs/5.0/components/carousel.md b/site/content/docs/5.0/components/carousel.md index afa652945f72..6aa9f614fa99 100644 --- a/site/content/docs/5.0/components/carousel.md +++ b/site/content/docs/5.0/components/carousel.md @@ -206,6 +206,34 @@ Add `data-bs-interval=""` to a `.carousel-item` to change the amount of time to {{< /example >}} +### Suppressing touch swiping + +By default, carousels support swiping left/right on touchscreen devices to move between slides. This can be explicitly suppressed using the `data-bs-touch` attribute. The example below also does not include the `data-bs-ride` attribute, and has `data-bs-interval="false"`, meaning that it won't autoplay. + +{{< example >}} + +{{< /example >}} + ## Dark variant 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`. @@ -286,7 +314,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap interval number 5000 - The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. + The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. keyboard @@ -297,15 +325,15 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap pause string | boolean - "hover" -

If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to false, hovering over the carousel won't pause it.

-

On touch-enabled devices, when set to "hover", cycling will pause on touchend (once the user finished interacting with the carousel) for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior.

+ 'hover' +

If set to 'hover', pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to false, hovering over the carousel won't pause it.

+

On touch-enabled devices, when set to 'hover', cycling will pause on touchend (once the user finished interacting with the carousel) for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior.

- slide + ride string | boolean false - Autoplays the carousel after the user manually cycles the first item. If "carousel", autoplays the carousel on load. + Autoplays the carousel after the user manually cycles the first item. If set to 'carousel', autoplays the carousel on load. wrap