Learn how to use the Rollbase Kendo UI built-in image carousel without any programming, and then how to customize the carousel's data source to provide images from any location.
It's easy to get a carousel on your page with Rollbase. Simply configure a couple of image fields in your object; Rollbase will automatically group the images into an image carousel. The carousel is rendered where you have dragged the first image field on the page.
The carousel is automatically responsive on any mobile devices. On desktop, you can configure it to have a fixed size or to be responsive; when responsive, you can even specify a maximum width beyond which the carousel will not expand.
Finally, the height of the carousel is automatically computed based on the first image's aspect ratio (or proportions).
Here is an example for a travel application:
What if you want to render images from other sources than image fields in your object?
Creating the data source:
The data source lets you control the list of images you want to render (See lines 5 to 9). You can also control the responsive behavior on desktop and, when responsive, the max width to expand to (line 12 and 13).
Note: if you actually use this code, the images are from a live web cam and depending on your time zone you may get a black image because it's night time there :).
The second step consists of instantiating the carousel:
You simply create the object (line 2) and then render it with the data source as well as the jQuery container element in which we want the carousel to appear.
That’s all there is to it. Here is how it renders on desktop:
Here's how it renders on a smartphone:
PS: If you want to try these carousels in a Rollbase app, feel free to post a comment or send a note and I'll send you a complete and installable Rollbase app. Or if you have access to eap.rollbase.com, you can pick it up from the marketplace.
New to Rollbase and want to find out more? You can learn more about Rollbase here, or start a free trial below.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.Learn More
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.