Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added autoscroll option section to Carousel docs #95

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/carousel/autoscroll.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import dash_mantine_components as dmc

component = dmc.Carousel(
[
dmc.CarouselSlide(dmc.Center("Slide-1", bg="blue", c="white", p=60)),
dmc.CarouselSlide(dmc.Center("Slide-2", bg="blue", c="white", p=60)),
dmc.CarouselSlide(dmc.Center("Slide-3", bg="blue", c="white", p=60)),
],
id="carousel-autoscroll",
loop=True,
autoScroll=True,
)
5 changes: 5 additions & 0 deletions docs/carousel/carousel.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ autoplay={"delay": 2000, "stopOnMouseEnter": True, "stopOnInteraction":False}
```
.. exec::docs.carousel.autoplay_props

### Autoscroll
Enable autoscroll by setting `autoScroll=True` or by passing in a `dict` with options. Refer to [Embla Carousel Auto Scroll Options](https://www.embla-carousel.com/plugins/auto-scroll/#options) to learn more.

.. exec::docs.carousel.autoscroll

### Carousel Styles API

Carousel supports Styles API, you can add styles to any inner element of the component with `classNames` prop. Refer to the [Styles API documentation](/styles-api) to learn more.
Expand Down