New! Flickity v2

IE8 & 9 dropped. 15% smaller. New features include:

Quick start

Start using Flickity in two steps.

  1. Add the Flickity .css and .js files to your site.

    <link rel="stylesheet" href="https://unpkg.com/flickity@2.0/dist/flickity.css" media="screen">
    
    <script src="https://unpkg.com/flickity@2.0/dist/flickity.pkgd.min.js"></script>
    
  2. Add data-flickity attribute to carousel elements.

    <div class="carousel" data-flickity>
      <div class="carousel-cell"></div>
      <div class="carousel-cell"></div>
      ...
    </div>
    

That’s it! You’re all set to start using and customizing Flickity.

Install

Download

CDN

Link directly to Flickity files on unpkg.

<link rel="stylesheet" href="https://unpkg.com/flickity@2.0/dist/flickity.min.css">
<!-- or -->
<link rel="stylesheet" href="https://unpkg.com/flickity@2.0/dist/flickity.css">
<script src="https://unpkg.com/flickity@2.0/dist/flickity.pkgd.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/flickity@2.0/dist/flickity.pkgd.js"></script>

Package managers

Install with Bower: bower install flickity --save

Install with npm: npm install flickity

License

Commercial license

If you want to use Flickity to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Read more about Flickity commercial licensing.

Once purchased, you’ll receive a commercial license PDF and be all set to use Flickity in your commercial applications.

Open source license

If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use Flickity under the terms of the GPLv3. Read more about Flickity open source licensing.

Getting started

Include the Flickity .css and .js files in your site.

<link rel="stylesheet" href="/path/to/flickity.css" media="screen">
<script src="/path/to/flickity.pkgd.min.js"></script>

Flickity works on a container carousel element with a group of cell elements.

<div class="main-carousel">
  <div class="carousel-cell">...</div>
  <div class="carousel-cell">...</div>
  <div class="carousel-cell">...</div>
  ...
</div>

There are several ways to initialize Flickity.

Initialize with jQuery

You can use Flickity as a jQuery plugin: $('selector').flickity().

$('.main-carousel').flickity({
  // options
  cellAlign: 'left',
  contain: true
});

Initialize with Vanilla JavaScript

You can use Flickity with vanilla JS: new Flickity( elem ). The Flickity() constructor accepts two arguments: the carousel element and an options object.

var elem = document.querySelector('.main-carousel');
var flkty = new Flickity( elem, {
  // options
  cellAlign: 'left',
  contain: true
});

// element argument can be a selector string
//   for an individual element
var flkty = new Flickity( '.main-carousel', {
  // options
});

Initialize with HTML

You can initialize Flickity in HTML, without writing any JavaScript. Add data-flickity attribute to the carousel element. Options can be set in its value.

<div class="main-carousel" data-flickity='{ "cellAlign": "left", "contain": true }'>

Options set in HTML must be valid JSON. Keys need to be quoted, for example "cellAlign":. Note that the attribute value uses single quotes ', but the JSON entities use double-quotes ".

Next

Feature showcase

wrapAround

Edit this demo on CodePen

Wrap-around the end back to the beginning for infinite scrolling.

freeScroll

Edit this demo on CodePen

Freely flick and scroll content without alignment.

groupCells

Edit this demo on CodePen

Groups cells together to act as individual slides.

autoPlay

Edit this demo on CodePen

Automatically advance to the next cell.

lazyLoad

Edit this demo on CodePen

Load cell images when selected.

Parallax

Edit this demo or vanilla JS demo on CodePen

Parallax effects on scroll event.

Images

Flickity makes beautiful image galleries.

View all options

Flickity in use

We’d love to see how you use Flickity! Tweet @metafizzyco or email yo@metafizzy.co to share your work and possibly get it featured here.

People like Flickity