Drupal slick carousel

Slick is a powerful and performant slideshow/carousel solution leveraging Ken Wheeler's Slick carousel. See http://kenwheeler.github.io/slick

Slick has a lot of options, please start with the very basic working samples from Slick Example.

Samples Demo

Versions

  • 8.x-2.1+ depends on core >= 8.8, (read more)
  • 8.x-2.x depends on core >= 8.6, with oEmbed, and without VEF/ VEM, requires Blazy 2.x
  • 8.x-1.x has optional integration with VEF/ VEM, requires Blazy 1.x.
  • 7.x-3.x (8.x backport WIP) requires PHP 5.6+ and a proper installation with an autoloader module, see Blazy for details. And its requirements.

Requirements

  • Slick library (1.6+ and <= 1.8.1):
    Master branch is not supported. Instead download, rename one of the official slick releases to slick, so the assets are available at:
    • sites/../libraries/slick/slick/slick.css
    • sites/../libraries/slick/slick/slick-theme.css (optional if a skin is chosen)
    • sites/../libraries/slick/slick/slick.min.js

    Specific to D8, remove "sites/.." part mentioned elsewhere, so the libraries are:
    /libraries/slick/slick/slick.min.js, etc.

  • Libraries, D7 and D8.9 below with Composer. D8.9+ has library finder in core.
  • [Optional] jqeasing, so available at:
    sites/../libraries/easing/jquery.easing.min.js
    Fallback for old browsers, ignorable to use CSS3 easing alone.
  • D8 and Slick 3.x: Blazy and PHP 5.6+. Slick branch must be similar, or later than Blazy. Checkout Versions below.
  • D7 only:
    • jQuery Update for jQuery 1.7+.
    • CTools. Only core CTools is needed. If Views installed, CTools is already installed.

Slick 8.x-2.x depends on core Media and Drupal 8.8+

Be sure to upgrade Drupal and have core Media installed first before upgrading from 8.x-1.x. Check out happy or sad stories on upgrade for solutions.

Migration/ Upgrading from Slick 2.x to 3.x is NOT supported, yet. Read more.

The above two issues are no real issues under "good" circumstances as mentioned in the above links.

Introducing a newborn kid on the box

Slick 7.x-2.1+ and 8.x branches require Slick library 1.6.0+.
Old Slick 7.x-2.0 below requires Slick library 1.5.9 below.

Known working and battle-tested Slick library version is Slick 1.6.0. If any issue with the latest (1.7 - 1.8.1), stick or revert to Slick 1.6.0.

See update SOP if trouble.

Installation

Manual:

Install the module as usual, more info can be found on:

Composer:

Check out #2907371, or jump to #21.

Features

  • Fully responsive. Scales with its container.
  • Uses CSS3 when available. Fully functional when not.
  • Swipe enabled. Or disabled, if you prefer.
  • Desktop mouse dragging.
  • Fully accessible with arrow key navigation.
  • Built-in lazyLoad, and multiple breakpoint options.
  • Random, autoplay, pagers, etc...
  • Works with Views, Image, Media or Field collection, or none of them.
  • Supports text, responsive image/ picture, responsive iframe, video, and audio carousels with aspect ratio, see samples. No extra jQuery plugin FitVids is required. Just CSS.
  • Exportable via CTools, or Features.
  • Modular and extensible skins, e.g.: Fullscreen, Fullwidth, Split, Grid, or multiple-row carousel.
  • Various slide layouts are built with CSS goodness.
  • Nested sliders/ overlays, or multiple carousels, within a single Slick.
  • Multimedia lightboxes, or inline multimedia.
  • Media switcher: linked to content, iframe, lightboxes: Colorbox, Photobox, PhotoSwipe.
  • Cacheability + lazyload = light + fast.
  • Navigation/ pager options:
    • arrows
    • dots, comes with different flavors: circle dots, dots as static grid thumbnails, and dots with hoverable thumbnails
    • text/ tabs, just provide Thumbnail caption, and leave Thumbnail style/image empty to achieve this or that
    • thumbnails

Enhancements

Slick works with fields and Views, and supports enhancements for image, video, audio, and more complex layouts.

Optional integration

Try Slick with a distro

A few composer-based D8 distros download Blazy and Slick libraries for you. Choose your favorite distro, and change MYPROJECT to your working directory accordingly.

  • Lightning
    composer create-project acquia/lightning-project MYPROJECT
  • Open Y
    composer create-project ymcatwincities/openy-project MYPROJECT --no-interaction --no-dev
  • Presto!
    composer create-project sitback/presto-project MYPROJECT --stability dev --no-interaction
  • Thunder
    composer create-project burdamagazinorg/thunder-project MYPROJECT --stability dev --no-interaction
  • Varbase
    composer create-project Vardot/varbase-project MYPROJECT --stability dev --no-interaction
  • Brainstorm profile
  • Seeds

Programmatically

Check out D8 slick.api.php, or D7 slick.api.php.

Tutorials and resources

Useful resources to make the most out of Slick.

Quick perfomance tips

  • Use lazyLoad "ondemand" / "anticipated" (v1.6.1+) for tons of images, not "progressive". Unless within an ajaxified lightbox.
  • Choose lazyload "Blazy" for carousels below the fold to delay loading them.
  • Tick "Optimized" option on the top right of Slick optionset edit page to free up some bytes.
  • Use image style with regular sizes containing effect "crop" in the name. This way all images will inherit dimensions calculated once.
  • Disable core library "slick-theme.css" as it contains font "slick" which may not be in use when using own icon font at:
    /admin/config/media/slick/ui
  • Use Blazy multi-serving images, core Responsive image (D8), or Picture (D7), accordingly.
  • Uninstall (not only disabled) Slick UI at production.
  • Enable Drupal cache, and CSS/ JS assets aggregation.
  • Concerns about Slick performance? Check this out, we got a little benchmark.

Troubleshooting

  • With a combination of options, Slick offers degree of flexibility to some extent. With great flexibility, comes great possibility, for better or worse, or fun with some advanced Slick examples. If worse, check out a few troubleshooting, known issues, and gotchas before for just in case it is already identified.
  • If any issue with displays at D7, be sure to update your jQuery version to 1.7+.
  • Any of Slick sub-modules branch must match this module branch. DEV for DEV. Full for full release.

Submitting issues or patches

Please check out this before submitting issues, or that before submitting patches.

Supporting organizations: 
Initial development

Project information

Downloads