Creating an Auto-Scrolling Carousel using Blank Canvas

Overview

Nosto's UGC Blank Canvas Widget allows users to very quickly and easily design their own Widget templates to suit their organisation's requirements.

In this guide we are going to create a Carousel Widget, which has been optimised for Tablet and Mobile devices and leverages Swiper by idangero.us to create not only a smooth scroll, but also some auto-scrolling behaviour.

In the guide we are going to move through each of the Mustache Partials to build the final Widget.

Back to Top

Layout

First Step is to build out our Layout partial. Here we are going to load the SVG elements for the left and right arrow and then define the container which will hold the Tiles.

Back to Top

Tile

Next step is defining our Tile partial. In this Widget, for our Tiles we simply wish to load the relevant Tile image in the background, and then on mouse-over include the Content Creator, the Tile Message and provide a link back to the original Tile on Social Media.

Back to Top

CSS

Next step is our styling. A number of the below styling elements are influenced from the Swiper by idangero.us documentation and can be customised to suit your design preferences.

Back to Top

Javascript

Finally is the Javascript. First step is loading the Swiper by idangero.us library. For this Widget we have loaded it from cdnjs and then defined our variables such as where to load from, speed of scroll and the mobile breakpoints.

Back to Top

Final Result

The final result should look similar to the Widget below with the auto-scrolling Carousel being responsive for Tablet and Mobile outputs as well.

Last updated

Was this helpful?