|
18 | 18 | | `itemsToShow` | `number` \| 'auto' | 1 | Number of slides visible simultaneously. Use 'auto' for variable width slides. |
|
19 | 19 | | `modelValue` | `number` | 0 | Controls the active slide index. Can be used with v-model for two-way binding. |
|
20 | 20 | | `mouseDrag` | `boolean` \| `DragConfig` | true | Enables/disables mouse drag navigation. See [Drag Options](#drag-options) for configuration details. |
|
21 |
| -| `mouseScroll` | `boolean` | false | Enables/disables mouse wheel scrolling for carousel navigation. | |
22 |
| -| `mouseScrollThreshold` | `number` | 10 | Controls the sensitivity threshold for mouse scrolling. Higher values require more scrolling. | |
| 21 | +| `mouseWheel` | `boolean` \| `WheelConfig` | false | Enables/disables mouse wheel scrolling for carousel navigation. See [Wheel Options](#wheel-options) for configuration details. | |
23 | 22 | | `pauseAutoplayOnHover` | `boolean` | false | When true, autoplay pauses while the mouse cursor is over the carousel. |
|
24 | 23 | | `preventExcessiveDragging` | `boolean` | false | Limits dragging behavior at carousel boundaries for better UX. <Badge text="0.13.0" /> |
|
25 | 24 | | `slideEffect` | 'slide', 'fade' | 'slide' | Determines the transition effect between slides. |
|
@@ -55,6 +54,42 @@ Both `mouseDrag` and `touchDrag` properties accept either a boolean value or a `
|
55 | 54 | </template>
|
56 | 55 | ```
|
57 | 56 |
|
| 57 | +## Wheel Options |
| 58 | + |
| 59 | +The `mouseWheel` property accepts either a boolean value or a `WheelConfig` object with the following properties: |
| 60 | + |
| 61 | +| Property | Type | Default | Description | |
| 62 | +|-------------|----------|---------|--------------------------------------------------------------------------------------------| |
| 63 | +| `threshold` | `number` | 10 | Controls the wheel movement threshold required to trigger a slide transition. Higher values require more scrolling to trigger a slide change. | |
| 64 | + |
| 65 | +### Example |
| 66 | + |
| 67 | +```vue |
| 68 | +<template> |
| 69 | + <Carousel |
| 70 | + :mouseWheel="{ threshold: 20 }" |
| 71 | + > |
| 72 | + <!-- Slides --> |
| 73 | + </Carousel> |
| 74 | +</template> |
| 75 | +``` |
| 76 | + |
| 77 | +## I18n |
| 78 | + |
| 79 | +Available keys: |
| 80 | + |
| 81 | +| Key | Defaults | Description | |
| 82 | +| --------------------- | -------------------------------------- | -------------------------------------------------------------------------- | |
| 83 | +| `ariaGallery` | "Gallery" | Used as the aria-label for the main carousel element, indicating purpose. | |
| 84 | +| `ariaNavigateToSlide` | "Navigate to slide {slideNumber}" | Sets title and aria-label for pagination buttons to select a slide. | |
| 85 | +| `ariaNextSlide` | "Navigate to next slide" | Sets title and aria-label for the "Next" navigation button. | |
| 86 | +| `ariaPreviousSlide` | "Navigate to previous slide" | Sets title and aria-label for the "Previous" navigation button. | |
| 87 | +| `iconArrowDown` | "Arrow pointing downwards" | Sets title and aria-label for the downward-pointing arrow SVG icon. | |
| 88 | +| `iconArrowLeft` | "Arrow pointing to the left" | Sets title and aria-label for the left-pointing arrow SVG icon. | |
| 89 | +| `iconArrowRight` | "Arrow pointing to the right" | Sets title and aria-label for the right-pointing arrow SVG icon. | |
| 90 | +| `iconArrowUp` | "Arrow pointing upwards" | Sets title and aria-label for the upward-pointing arrow SVG icon. | |
| 91 | +| `itemXofY` | "Item {currentSlide} of {slidesCount}" | Provides screen readers with the current slide's position in the sequence. | |
| 92 | + |
58 | 93 | ## Slots
|
59 | 94 |
|
60 | 95 | ### Slides/Default
|
@@ -141,3 +176,16 @@ Available keys:
|
141 | 176 | | `iconArrowRight` | "Arrow pointing to the right" | Sets title and aria-label for the right-pointing arrow SVG icon. |
|
142 | 177 | | `iconArrowUp` | "Arrow pointing upwards" | Sets title and aria-label for the upward-pointing arrow SVG icon. |
|
143 | 178 | | `itemXofY` | "Item {currentSlide} of {slidesCount}" | Provides screen readers with the current slide's position in the sequence. |
|
| 179 | + |
| 180 | +### Example |
| 181 | + |
| 182 | +```vue |
| 183 | +<template> |
| 184 | + <Carousel |
| 185 | + :mouseDrag="{ threshold: 0.5 }" |
| 186 | + :touchDrag="{ threshold: 0.7 }" |
| 187 | + > |
| 188 | + <!-- Slides --> |
| 189 | + </Carousel> |
| 190 | +</template> |
| 191 | +``` |
0 commit comments