Carousels are a convenient and effective way to present steps, tutorials and other guided content to your visitors.

Standard carousels

Creating carousels within your article content doesn’t involve copying and pasting any HTML as the Carousels extension lets you transform standard ordered (<ol>) and unordered (<ul>) lists created in the article editor into an interactive carousel element. This makes it easy for visitors to find what they’re looking and allows content creators to focus on producing helpful content.

If you do ever need to migrate your content you can do so without having to worry about unnecessary markup or inline styles.

The default carousel template
View code
<ul class="js-carousel">

The default template is simple, elegant and responsive and will automatically inherit the overall style of your theme. You can add any type of content you like to each carousel slide, including HTML, images, videos and other article formatting styles.

Customized carousel templates can introduce icons, transition effects and even entirely new layouts.

Customized carousel
View code
<ul class="js-carousel">
  <li title="The first slide">...</li>
  <li title="The second slide">...</li>
  <li title="The third slide">...</li>

<template id="tmpl-carousel">
  <% if (children.length) { %>
    <div class="md:m-5" x-data="{ active: 1 }" x-on:carousel:next="active++" x-on:carousel:previous="active--">
      <div class="p-6 mb-4 border border-radius bg-white border-top border-top-4 border-top-primary shadow-lg">
        <ul class="list-unstyled">
          <% children.forEach(function(child, index) { %>
              <%= child.innerHTML %>
          <% }); %>
      <div class="flex align-items-center justify-content-center my-5">
        <button class="button button-primary circle flex justify-content-center p-2 js-previous" title="Previous">
          <svg class="fill-current align-self-center" xmlns="" width="18" height="18" viewBox="0 0 100 100">
            <polygon points="40.6,88.1 50.2,78.4 28.6,56.8 97.5,56.8 97.5,43.2 28.6,43.2 50.2,21.6 40.6,11.9 2.5,50"/>
        <span class="text-gray-700 mx-4 font-semibold"><span class="step-number" x-text="active"></span> of <%= children.length %></span>
        <button class="button button-primary circle flex justify-content-center p-2 js-next" title="Next">
          <svg class="fill-current align-self-center" xmlns="" width="18" height="18" viewBox="0 0 100 100">
            <polygon points="59.4,11.9 49.8,21.6 71.4,43.2 2.5,43.2 2.5,56.8 71.4,56.8 49.8,78.4 59.4,88.1 97.5,50"/>
  <% } %>

Carousels can be used anywhere in the help center, but often they are used within article content. Our extension allows you to create toggles in several different ways, none of which require you to copy-and-paste any HTML.

The Carousels extension is bundled into all of our themes by default, so you can start using it straight away. The source code can be found within the extensions.(min.)js file in the theme’s Assets folder.

When creating or updating an article using the Zendesk article editor:

  1. Create a numbered (Add numbered list button) or bulleted list (Add bulleted list button) using the editor toolbar and add the content that you’d like to see in each carousel slide within the list items.

  2. Click the Source Code (Source code icon) button in the editor toolbar to view the source code of the page.

  3. Add a class name of .js-carousel to the list element to convert it into an interactive carousel.

     <ul class="js-carousel">

The Carousels extension allows you to convert a standard ordered (<ol>) or unordered (<ul>) list into an interactive carousel using JavaScript:

<ul id="carousel">...</ul>

<script type="text/javascript">
  ready(function() {
    var carousel = document.getElementById('carousel');
    if (carousel) {
      new Carousel(carousel, {
        // Options go here


Options can be passed via data attributes or JavaScript.

For data attributes, append the option name to data- and use kebab case instead of camel case.

Name Type Default Description
initial number 0 The index of the page to show on initialization.
children string ul > li The CSS selector for identifying child elements (pages).
previousButton string .js-previous The CSS selector for identifying the Previous button.
nextButton string .js-next The CSS selector for identifying the Next button.
scrollToTop boolean false True if the page should scroll to the top of the current page after the Next or Previous buttons are clicked.
template string
carousel The name of the micro-template to use.
templateData object {} Additional data to provide to the template rendering function.


Class Properties
carousel:initialize Fires when the extension is initialized.
carousel:render Fires when the carousel has been rendered.
carousel:next Fires when the next page is shown.
carousel:previous Fires when the previous page is shown.

Related extensions

Animations and transitions Free

Animations and transitions

Add engaging animation and transition effects to elements.

Content blocks and icons Free

Content blocks and icons

Display icons against categories, sections and articles.

Featured articles Free

Featured articles

Display a list of articles with one or more labels.