English
FxCarousel
About 213 wordsLess than 1 minute
2025-12-16
Loops through content such as images and text of the same type within limited space.
Carousel Attributes
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| height | Height of the carousel | string | — | — |
| initial-index | Index of the initially active slide, starting from 0 | number | — | 0 |
| trigger | Trigger mode of indicators | string | click | — |
| autoplay | Whether to switch automatically | boolean | — | true |
| interval | Interval of automatic switching, in milliseconds | number | — | 3000 |
| indicator-position | Position of the indicators | string | outside/none | — |
| arrow | When to display the navigation arrows | string | always/hover/never | hover |
| type | Carousel type | string | card | — |
| loop | Whether to loop | boolean | — | true |
| direction | Display direction of the carousel | string | horizontal/vertical | horizontal |
Carousel Events
| Event Name | Description | Callback Parameters |
|---|---|---|
| change | Triggered when the slide changes | Index of the currently active slide, index of the previous slide |
Carousel Methods
| Method Name | Description | Parameters |
|---|---|---|
| setActiveItem | Switch slides manually | Index of the target slide starting from 0, or the name of the corresponding el-carousel-item |
| prev | Switch to the previous slide | — |
| next | Switch to the next slide | — |
Carousel-Item Attributes
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| name | Name of the slide, can be used as the parameter for setActiveItem | string | — | — |
| label | Text of the indicator corresponding to the slide | string | — | — |
