Owl Carousel 2: Touch-Enabled jQuery Slider

Owl Carousel is a touch-enabled jQuery library for responsive sliders. Here you will find clear guidance on installing it, configuring its options, resolving common faults and downloading the source files.

Laptop and phone displaying a responsive Owl Carousel slider on a dark studio desk
60+Configuration options
9In-depth guides
2.3.4Current release
MITOpen-source licence
Overview

What Is Owl Carousel?

Owl Carousel is an open-source jQuery library that converts a plain group of HTML elements into a slider. Each child element becomes a slide, and the library manages positioning, dragging, transitions and controls without forcing changes to your markup.

The project was created by Bartosz Wojciechowski, and its second version, now at release 2.3.4, is distributed under the MIT licence through npm and cdnjs. It uses CSS3 transforms for smooth, hardware-accelerated movement and falls back gracefully in older browsers.

Its strength lies in configuration rather than code. More than sixty options decide how many items appear, how the carousel adapts at each breakpoint and whether it loops, autoplays or lazy-loads images. Features such as autoplay, video and animation sit in separate internal modules, which keeps the core lean and easy to reason about.

The library runs in all current versions of Chrome, Firefox, Safari and Edge, on both desktop and mobile. Because it works with ordinary HTML, search engines and assistive technologies can still read every slide, provided the content itself is written and labelled with care.

Laptop on an oak desk showing a travel website with an Owl Carousel of landscape photographs
Capabilities

Owl Carousel Features

These capabilities cover the requirements of most slider designs, from simple image rows to interactive product showcases. Each one is controlled through options, so enabling a feature rarely requires more than a single line of configuration.

Touch and Drag

Swipe gestures on phones and tablets and mouse dragging on desktops feel natural, with adjustable resistance at either end.

Responsive Breakpoints

A single object defines how many items, how much spacing and which controls appear at each viewport width.

Infinite Looping

Cloned slides at both ends create a continuous cycle, so the carousel never jumps abruptly back to its start.

Lazy Loading

Images load only as their slides approach the viewport, which reduces initial page weight and saves bandwidth.

Autoplay Controls

Timed rotation offers adjustable intervals, pause on hover and programmatic start and stop commands.

Custom Navigation

Arrows and dots accept your own markup and can be placed in any container on the page, or removed entirely.

CSS3 Animations

Single-item carousels can fade or use any animate.css effect in place of the default horizontal slide.

Events and API

Namespaced events report every movement, while triggered commands let scripts add, remove and move slides.

Setup

How to Install Owl Carousel

Installation takes five short steps. The order of the script tags matters more than anything else, so follow the sequence closely. The example on the right combines the markup and initialisation for a three-column carousel.

  1. STEP 1Obtain the files

    Download the source archive below, install the package with npm install owl.carousel, or reference the copies hosted on cdnjs.

  2. STEP 2Include the stylesheets

    Add owl.carousel.min.css to the document head, followed by owl.theme.default.min.css if you want the default control styling.

  3. STEP 3Add your markup

    Wrap the slides in a container carrying the classes owl-carousel and owl-theme. Every direct child element becomes one slide.

  4. STEP 4Load the scripts

    Place jQuery before owl.carousel.min.js, ideally just before the closing body tag, so that the library can attach itself to jQuery.

  5. STEP 5Initialise the carousel

    Call owlCarousel() on the container inside a document-ready handler, passing an options object to shape its behaviour.

<div class="owl-carousel owl-theme">
  <div class="item">Slide 1</div>
  <div class="item">Slide 2</div>
  <div class="item">Slide 3</div>
</div>

<script>
$(function () {
  $(".owl-carousel").owlCarousel({
    loop: true,
    margin: 16,
    nav: true,
    responsive: {
      0:    { items: 1 },
      600:  { items: 2 },
      1000: { items: 3 }
    }
  });
});
</script>
Reference

Owl Carousel Options and Defaults

The table lists the options that most projects adjust first, with their default values in version 2.3.4. Any option can also appear inside a responsive breakpoint.

OptionDefaultPurpose
items3Number of slides visible at once
margin0Space in pixels between slides
loopfalseCreates an endless cycle using cloned slides
navfalseDisplays previous and next buttons
dotstrueDisplays pagination dots
autoplayfalseAdvances slides automatically
autoplayTimeout5000Interval between automatic moves, in milliseconds
smartSpeed250Duration of each transition, in milliseconds
lazyLoadfalseDefers image loading until a slide is needed
responsive{}Breakpoint overrides keyed by minimum width in pixels

Options set at the top level act as defaults. When a breakpoint matches, its values override those defaults, and anything the breakpoint omits falls back to the top-level setting rather than to a smaller breakpoint. Stating important values explicitly at each breakpoint keeps behaviour predictable as a project grows.

Examples

Where Owl Carousel Works Well

A carousel earns its place when content is genuinely sequential, or when space is tight and every item carries similar weight. These patterns suit the library particularly well:

  • Product rows on e-commerce category and detail pages
  • Customer testimonials and short review highlights
  • Logo strips presenting partners, clients or sponsors
  • Portfolio and photography galleries
  • Featured stories on news and magazine homepages
  • YouTube and Vimeo clips through the built-in video module

Where every item matters equally and must be seen, a static grid often serves readers better. Reserve sliders for content that people can browse at their own pace, and keep the most important message on the first slide, since many visitors never advance beyond it.

Tablet and phone showing an online shop with a product carousel of ceramics and glassware
Source files

Download Owl Carousel

The archive contains the original version 1 source of Owl Carousel, including the Owl Carousel script in full and minified form, its core, theme and transition stylesheets, and a set of demo pages. Extract it, copy the owl-carousel folder into your project and reference the files from your pages.

  • ZIP archiveMaster branch
  • GitHubRepository mirror
  • MIT licenceFree to use
  • jQuery 1.7+Required
Download ZIP

Projects that follow the version 2 API used in our guides can install it with npm install owl.carousel or load the 2.3.4 files from cdnjs.

Laptop terminal listing the Owl Carousel files extracted from the downloaded ZIP archive
Quality

Owl Carousel Best Practices

A slider that loads quickly and works for every visitor matters more than any visual effect. These habits make the greatest difference in practice.

  • Size images for their slot

    Export each image at the width it is displayed and compress it. A four-item row on a phone needs far smaller files than a full-width hero banner.

  • Reserve space before loading

    Give every image width and height attributes, or an aspect ratio in CSS, so that the page does not jump as slides load.

  • Keep controls easy to reach

    Arrows and dots should offer touch targets of at least 44 pixels and a clear focus outline for keyboard users.

  • Label controls for assistive technology

    Icon-only arrows need an accessible name, such as an aria-label, so that screen reader users know what each button does.

  • Let people pause movement

    Pair autoplay with pause on hover and a visible control, and disable it when the visitor's system requests reduced motion.

  • Test on real hardware

    Emulators are useful, but only real phones and tablets reveal how dragging, momentum and rendering actually feel.

Guides

Owl Carousel Guides

Practical articles that explain setup, responsive behaviour and debugging, each with working code you can adapt. Nine guides are available in total, covering everything from first installation to migration between versions.

View All Guides

Conclusion

Owl Carousel remains a dependable choice for projects that already use jQuery and need a slider with sensible defaults and deep configuration. Begin with the five installation steps, adjust the handful of options that matter for your layout, and test on real devices before adding refinements such as lazy loading or custom navigation.

When something behaves unexpectedly, the cause is usually script order, missing styles or a parent container with an unusual width, and the troubleshooting guide addresses each of these. With those foundations in place, the library performs reliably on phones, tablets and desktop screens alike.

The guides on this site expand on every topic introduced here, from breakpoints and navigation to events and migration, so you can return to the relevant article whenever a project calls for something more specialised.

Questions

Owl Carousel FAQs

Owl Carousel is a free, open-source jQuery library that turns a group of HTML elements into a responsive, touch-enabled slider. It handles dragging, looping, autoplay, lazy loading and navigation controls through a large set of configuration options.

Yes. Owl Carousel extends jQuery, so jQuery must load before the Owl Carousel script. Version 2.3.4 recommends jQuery 1.8.3 or later, while the original version 1 works with jQuery 1.7 or later.

Yes. Owl Carousel is released under the MIT licence, which permits use in personal and commercial projects, provided the copyright and licence notice remain in the distributed files.

Use the responsive option. Each key is a minimum viewport width and each value is a set of overrides, for example one item from 0 pixels, two from 600 pixels and four from 1000 pixels.

The core stylesheet hides the carousel until initialisation succeeds. Check that the stylesheet loads, that jQuery comes before the Owl Carousel script and that the browser console shows no earlier JavaScript errors.

Set loop to true. The library clones slides at both ends so movement continues without a visible jump. Looping requires more items than are visible at once; otherwise, consider the rewind option.

Yes. The navText option accepts custom HTML for both buttons, and navContainer and dotsContainer let you render the controls inside any element elsewhere on the page.

Yes. Set lazyLoad to true, add the class owl-lazy to each image and move its source into a data-src attribute. The library loads each image as its slide approaches the visible area.

Enable autoplayHoverPause alongside autoplay. Rotation stops while the pointer rests on the carousel and resumes when it leaves. Custom buttons can also trigger the play and stop events.

Version 2 is a rewrite with renamed options, a responsive object based on minimum widths, new stylesheets and event-based controls. Code written for version 1 needs updating before it works with version 2.