Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
Can I use <ons-carousel> as a slider??
-
hey @Fran-Diox can I use <ons-carousel> tag for my slider and can it slide automatically??
-
@Gaurav You can simply use
setInterval
and increase the carousel index. Currently, the carousel has no “infinite” swipe, meaning that once it reaches its last index you need to reset it to 0. Something as simple as setting the index to++index%length
should work.
-
@Fran-Diox thanks for reply but I want <ons-carousel> just for scrolling images and other components below <ons-carousel> so can I write those components
-
@Gaurav If you don’t provide the
fullscreen
attribute it won’t cover everything, so I think you can do what you want.
-
@Fran-Diox ooh thank you