aboutsummaryrefslogtreecommitdiff
path: root/site/docs/4.1/components
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2018-03-03 23:04:11 +0200
committerXhmikosR <[email protected]>2018-10-20 15:32:09 +0300
commitcaefd7046372e954d21550bbdadcabf98b2a86f0 (patch)
tree9e1835a7d61a8302c4dcaaff5b5a023efcae96b1 /site/docs/4.1/components
parentbf573896472c83e2b85b52f6cbf606765b73cb3e (diff)
downloadbootstrap-caefd7046372e954d21550bbdadcabf98b2a86f0.tar.xz
bootstrap-caefd7046372e954d21550bbdadcabf98b2a86f0.zip
Add touch support in our carousel with HammerJS.
Diffstat (limited to 'site/docs/4.1/components')
-rw-r--r--site/docs/4.1/components/carousel.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/site/docs/4.1/components/carousel.md b/site/docs/4.1/components/carousel.md
index 543b06430..6bfb35206 100644
--- a/site/docs/4.1/components/carousel.md
+++ b/site/docs/4.1/components/carousel.md
@@ -12,6 +12,8 @@ The carousel is a slideshow for cycling through a series of content, built with
In browsers where the [Page Visibility API](https://www.w3.org/TR/page-visibility/) 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.).
+The carousel supports swipe gestures (left and right) using [HammerJS]({{ site.cdn.hammer }}). For this to function correctly you need to include HammerJS before Bootstrap or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains HammerJS.
+
Please be aware that nested carousels are not supported, and carousels are generally not compliant with accessibility standards.
Lastly, if you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
@@ -281,6 +283,12 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
<td>true</td>
<td>Whether the carousel should cycle continuously or have hard stops.</td>
</tr>
+ <tr>
+ <td>touch</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Whether the carousel should handle touch event and allow swipe left/right.</td>
+ </tr>
</tbody>
</table>