Carousel component. A carousel can be used to display several items in the same space. The component supports displaying content both horizontally and vertically. The user can scroll through the items by dragging and it can also be controller programmatically.
A carousel is used to show several items in the same place. The user can switch between the items by panning. The VOnsCarousel
component can also be controlled programatically through the activeIndex
prop. An update:activeIndex
event is fired whenever the user interacts with this component, allowing you to synchronize activeIndex
prop. It is possible to use Vue’s v-model
directive for this.
VOnsCarousel
can also be nested if the carousels implement different directions.
Name | Description |
---|---|
postchange | Fired just after the current carousel item has changed. |
prechange | Fired just before the current carousel item changes. |
refresh | Fired when the carousel has been refreshed. |
overscroll | Fired when the carousel has been overscrolled. |
swipe | Fires when the carousel swipes. |
update:active-index |
Fired right after user interaction. Useful to update active-index prop.
|
Fired just after the current carousel item has changed.
Name | Type | Description |
---|---|---|
event | Object | Event object. |
event.carousel | Object | Carousel object. |
event.activeIndex | Number | Current active index. |
event.lastActiveIndex | Number | Previous active index. |
Fired just before the current carousel item changes.
Name | Type | Description |
---|---|---|
event | Object | Event object. |
event.carousel | Object | Carousel object. |
event.activeIndex | Number | Current active index. |
event.lastActiveIndex | Number | Previous active index. |
Fired when the carousel has been refreshed.
Name | Type | Description |
---|---|---|
event | Object | Event object. |
event.carousel | Object | Carousel object. |
Fired when the carousel has been overscrolled.
Fires when the carousel swipes.
Name | Type | Description |
---|---|---|
event | Object | Event object. |
event.index | Number | Current index. |
event.options | Object | Animation options object. |
Fired right after user interaction. Useful to update active-index
prop.
Name | Type | Description |
---|---|---|
event | Number |
New value for active-index prop.
|
If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.
For bug reports and feature requests use our GitHub Issues page.