Skip to Main Content

Carousels

About Carousels

Carousels are an interactive way to communicate collections of content or media. They are often used when a single hero element isn't sufficient to communicate multiple facets or pieces of news. Carousels are built into Clone using the help of Glider.js. By default, carousels built using Clone's standard carousel code (found below) will work out of the box. Alternatively, they can be initialized manually (explained below) which allows you to access all of Glider.js' properties and functionality.

More Info   See Examples   Changelog

Carousel Accessibility

Carousels are designed to be tab-navigable and touch enabled. Images and media inside of carousels should always have associated descriptive alt text.

Code Snippet

Detailed Information

Installing a Carousel

By default, pasting the carousel code above into your project will work out of the box. Sometimes however, you'll want to customize the nuances and functionality of the carousel to suit your specific needs. In order to do this, apply the data-c-custom-carousel data attribute to the carousel. This will tell Clone to skip over it, allowing you to initialize it manually using Glider.js' documentation.

Types of Carousel

<div data-c-carousel="content"></div>

Content type carousels are used to display important information. These carousels provide the opportunity to include photo backgrounds, a title, and paragraph based content.

<div data-c-carousel="image"></div>

Image type carousels can be used to display images in a gallery-type format. The content carousel is more suited for other types of variable media.

Pieces of a Carousel

<div data-c-carousel-wrapper></div>

The carousel wrapper provides important spacing and responsive properties to the carousel itself.

<div data-c-carousel></div>

The carousel element is where you determine the type (outlined above).

<div data-c-carousel-item></div>

Carousel items are what Glider uses to detect and generate slides for the carousel. These elements contain your content.

<div data-c-carousel-arrow="prev"></div>, <div data-c-carousel-arrow="next"></div>

These attributes indicate the triggers for navigating left and right through the carousel's content.

<div data-c-carousel-dots></div>

This element indicates the parent element that contains the carousel's dot navigation structure. Always use this element in partnership with the arrows outlined above.

Examples

Optional Slide Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Optional Slide Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut lectus arcu bibendum at varius vel pharetra. Aenean vel elit scelerisque mauris pellentesque pulvinar pellentesque habitant morbi. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus.

Optional Slide Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Changelog

Version 2.4.0

Version 2.3.12

Version 2.3.4

Version 2.3.2