PHPackages                             fabianobn/slick - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. fabianobn/slick

ActiveLibrary[Templating &amp; Views](/categories/templating)

fabianobn/slick
===============

This is the atualized Slick Slider used in Wordpress

v1.8.2(7y ago)1327↓100%JavaScript

Since Jun 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/fabianobn/slick)[ Packagist](https://packagist.org/packages/fabianobn/slick)[ RSS](/packages/fabianobn-slick/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

slick
-----

[](#slick)

*the last carousel you'll ever need*

#### Demo

[](#demo)

[http://kenwheeler.github.io/slick](http://kenwheeler.github.io/slick/)

#### CDN

[](#cdn)

To start working with Slick right away, there's a couple of CDN choices availabile to serve the files as close, and fast as possible to your users:

-
-

##### Example using jsDelivr

[](#example-using-jsdelivr)

Just add a link to the css file in your ``:

```

```

Then, before your closing `` tag add:

```

```

#### Package Managers

[](#package-managers)

```
# Bower
bower install --save slick-carousel

# NPM
npm install slick-carousel
```

#### Contributing

[](#contributing)

PLEASE review CONTRIBUTING.markdown prior to requesting a feature, filing a pull request or filing an issue.

### Data Attribute Settings

[](#data-attribute-settings)

In slick 1.5 you can now add settings using the data-slick attribute. You still need to call $(element).slick() to initialize slick on the element.

Example:

```

  1
  2
  3
  4
  5
  6

```

### Settings

[](#settings)

OptionTypeDefaultDescriptionaccessibilitybooleantrueEnables tabbing and arrow key navigation. Unless `autoplay: true`, sets browser focus to current slide (or first of current slide set, if multiple `slidesToShow`) after slide change. For full a11y compliance enable focusOnChange in addition to this.adaptiveHeightbooleanfalseAdapts slider height to the current slideappendArrowsstring$(element)Change where the navigation arrows are attached (Selector, htmlString, Array, Element, jQuery object)appendDotsstring$(element)Change where the navigation dots are attached (Selector, htmlString, Array, Element, jQuery object)arrowsbooleantrueEnable Next/Prev arrowsasNavForstring$(element)Enables syncing of multiple slidersautoplaybooleanfalseEnables auto play of slidesautoplaySpeedint3000Auto play change intervalcenterModebooleanfalseEnables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts.centerPaddingstring'50px'Side padding when in center mode. (px or %)cssEasestring'ease'CSS3 easingcustomPagingfunctionn/aCustom paging templates. See source for use example.dotsbooleanfalseCurrent slide indicator dotsdotsClassstring'slick-dots'Class for slide indicator dots containerdraggablebooleantrueEnables desktop draggingeasingstring'linear'animate() fallback easingedgeFrictioninteger0.15Resistance when swiping edges of non-infinite carouselsfadebooleanfalseEnables fadefocusOnSelectbooleanfalseEnable focus on selected element (click)focusOnChangebooleanfalsePuts focus on slide after changeinfinitebooleantrueInfinite loopinginitialSlideinteger0Slide to start onlazyLoadstring'ondemand'Accepts 'ondemand' or 'progressive' for lazy load technique. 'ondemand' will load the image as soon as you slide to it, 'progressive' loads one image after the other when the page loads.mobileFirstbooleanfalseResponsive settings use mobile first calculationnextArrowstring (html | jQuery selector) | object (DOM node | jQuery object)`Next`Allows you to select a node or customize the HTML for the "Next" arrow.pauseOnDotsHoverbooleanfalsePauses autoplay when a dot is hoveredpauseOnFocusbooleantruePauses autoplay when slider is focussedpauseOnHoverbooleantruePauses autoplay on hoverprevArrowstring (html | jQuery selector) | object (DOM node | jQuery object)`Previous`Allows you to select a node or customize the HTML for the "Previous" arrow.respondTostring'window'Width that responsive object responds to. Can be 'window', 'slider' or 'min' (the smaller of the two).responsivearraynullArray of objects [containing breakpoints and settings objects (see example)](#responsive-option-example). Enables settings at given `breakpoint`. Set `settings` to "unslick" instead of an object to disable slick at a given breakpoint.rowsint1Setting this to more than 1 initializes grid mode. Use slidesPerRow to set how many slides should be in each row.rtlbooleanfalseChange the slider's direction to become right-to-leftslidestring''Slide element queryslidesPerRowint1With grid mode initialized via the rows option, this sets how many slides are in each grid row.slidesToScrollint1\# of slides to scroll at a timeslidesToShowint1\# of slides to show at a timespeedint300Transition speedswipebooleantrueEnables touch swipeswipeToSlidebooleanfalseSwipe to slide irrespective of slidesToScrolltouchMovebooleantrueEnables slide moving with touchtouchThresholdint5To advance slides, the user must swipe a length of (1/touchThreshold) \* the width of the slider.useCSSbooleantrueEnable/Disable CSS TransitionsuseTransformbooleantrueEnable/Disable CSS TransformsvariableWidthbooleanfalseDisables automatic slide width calculationverticalbooleanfalseVertical slide directionverticalSwipingbooleanfalseChanges swipe direction to verticalwaitForAnimatebooleantrueIgnores requests to advance the slide while animatingzIndexnumber1000Set the zIndex values for slides, useful for IE9 and lower##### Responsive Option Example

[](#responsive-option-example)

The responsive option, and value, is quite unique and powerful. You can use it like so:

```
$(".slider").slick({

  // normal options...
  infinite: false,

  // the magic
  responsive: [{

      breakpoint: 1024,
      settings: {
        slidesToShow: 3,
        infinite: true
      }

    }, {

      breakpoint: 600,
      settings: {
        slidesToShow: 2,
        dots: true
      }

    }, {

      breakpoint: 300,
      settings: "unslick" // destroys slick

    }]
});
```

### Events

[](#events)

In slick 1.4, callback methods were deprecated and replaced with events. Use them before the initialization of slick as shown below:

```
// On swipe event
$('.your-element').on('swipe', function(event, slick, direction){
  console.log(direction);
  // left
});

// On edge hit
$('.your-element').on('edge', function(event, slick, direction){
  console.log('edge was hit')
});

// On before slide change
$('.your-element').on('beforeChange', function(event, slick, currentSlide, nextSlide){
  console.log(nextSlide);
});
```

EventParamsDescriptionafterChangeevent, slick, currentSlideAfter slide change callbackbeforeChangeevent, slick, currentSlide, nextSlideBefore slide change callbackbreakpointevent, slick, breakpointFires after a breakpoint is hitdestroyevent, slickWhen slider is destroyed, or unslicked.edgeevent, slick, directionFires when an edge is overscrolled in non-infinite mode.initevent, slickWhen Slick initializes for the first time callback. Note that this event should be defined before initializing the slider.reInitevent, slickEvery time Slick (re-)initializes callbacksetPositionevent, slickEvery time Slick recalculates positionswipeevent, slick, directionFires after swipe/draglazyLoadedevent, slick, image, imageSourceFires after image loads lazilylazyLoadErrorevent, slick, image, imageSourceFires after image fails to load#### Methods

[](#methods)

Methods are called on slick instances through the slick method itself in version 1.4, see below:

```
// Add a slide
$('.your-element').slick('slickAdd',"");

// Get the current slide
var currentSlide = $('.your-element').slick('slickCurrentSlide');
```

This new syntax allows you to call any internal slick method as well:

```
// Manually refresh positioning of slick
$('.your-element').slick('setPosition');
```

MethodArgumentDescription`slick`options : objectInitializes Slick`unslick`Destroys Slick`slickNext`Triggers next slide`slickPrev`Triggers previous slide`slickPause`Pause Autoplay`slickPlay`Start Autoplay (*will also set `autoplay` option to `true`*)`slickGoTo`index : int, dontAnimate : boolGoes to slide by index, skipping animation if second parameter is set to true`slickCurrentSlide`Returns the current slide index`slickAdd`element : html or DOM object, index: int, addBefore: boolAdd a slide. If an index is provided, will add at that index, or before if addBefore is set. If no index is provided, add to the end or to the beginning if addBefore is set. Accepts HTML String`slickRemove`index: int, removeBefore: boolRemove slide by index. If removeBefore is set true, remove slide preceding index, or the first slide if no index is specified. If removeBefore is set to false, remove the slide following index, or the last slide if no index is set.`slickFilter`filter : selector or functionFilters slides using jQuery .filter syntax`slickUnfilter`Removes applied filter`slickGetOption`option : string(option name)Gets an option value.`slickSetOption`change an option, `refresh` is always `boolean` and will update UI changes...`option, value, refresh`change a [single `option`](https://github.com/kenwheeler/slick#settings) to given `value`; `refresh` is optional.`"responsive", [{ breakpoint: n, settings: {} }, ... ], refresh`change or add [whole sets of responsive options](#responsive-option-example)`{ option: value, option: value, ... }, refresh`change [multiple `option`s](https://github.com/kenwheeler/slick#settings) to corresponding `value`s.#### Example

[](#example)

Initialize with:

```
$(element).slick({
  dots: true,
  speed: 500
});
```

Change the speed with:

```
$(element).slick('slickSetOption', 'speed', 5000, true);
```

Destroy with:

```
$(element).slick('unslick');
```

#### Sass Variables

[](#sass-variables)

VariableTypeDefaultDescription$slick-font-pathstring"./fonts/"Directory path for the slick icon font$slick-font-familystring"slick"Font-family for slick icon font$slick-loader-pathstring"./"Directory path for the loader image$slick-arrow-colorcolorwhiteColor of the left/right arrow icons$slick-dot-colorcolorblackColor of the navigation dots$slick-dot-color-activecolor$slick-dot-colorColor of the active navigation dot$slick-prev-characterstring'\\2190'Unicode character code for the previous arrow icon$slick-next-characterstring'\\2192'Unicode character code for the next arrow icon$slick-dot-characterstring'\\2022'Unicode character code for the navigation dot icon$slick-dot-sizepixels6pxSize of the navigation dots#### Browser support

[](#browser-support)

Slick works on IE8+ in addition to other modern browsers such as Chrome, Firefox, and Safari.

#### Dependencies

[](#dependencies)

jQuery 1.7

#### License

[](#license)

Copyright (c) 2017 Ken Wheeler

Licensed under the MIT license.

Free as in Bacon.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 61.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2870d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc0d11f33a2a708686dc80fc2587ec8c30a2e8dd997f982db806fb955d6a1e3f?d=identicon)[fabianobn](/maintainers/fabianobn)

---

Top Contributors

[![kenwheeler](https://avatars.githubusercontent.com/u/286616?v=4)](https://github.com/kenwheeler "kenwheeler (422 commits)")[![simeydotme](https://avatars.githubusercontent.com/u/2817396?v=4)](https://github.com/simeydotme "simeydotme (131 commits)")[![cielt](https://avatars.githubusercontent.com/u/3287153?v=4)](https://github.com/cielt "cielt (28 commits)")[![SirKnightDragoon](https://avatars.githubusercontent.com/u/210256?v=4)](https://github.com/SirKnightDragoon "SirKnightDragoon (17 commits)")[![colbyfayock](https://avatars.githubusercontent.com/u/1045274?v=4)](https://github.com/colbyfayock "colbyfayock (9 commits)")[![gflateman](https://avatars.githubusercontent.com/u/1820514?v=4)](https://github.com/gflateman "gflateman (8 commits)")[![ahmadalfy](https://avatars.githubusercontent.com/u/87611?v=4)](https://github.com/ahmadalfy "ahmadalfy (7 commits)")[![wilirius](https://avatars.githubusercontent.com/u/5685445?v=4)](https://github.com/wilirius "wilirius (5 commits)")[![flaviocysne](https://avatars.githubusercontent.com/u/1753417?v=4)](https://github.com/flaviocysne "flaviocysne (5 commits)")[![marcellscarlett](https://avatars.githubusercontent.com/u/2667283?v=4)](https://github.com/marcellscarlett "marcellscarlett (4 commits)")[![engelfrost](https://avatars.githubusercontent.com/u/11315?v=4)](https://github.com/engelfrost "engelfrost (4 commits)")[![coliff](https://avatars.githubusercontent.com/u/1212885?v=4)](https://github.com/coliff "coliff (3 commits)")[![badlamer](https://avatars.githubusercontent.com/u/1637293?v=4)](https://github.com/badlamer "badlamer (3 commits)")[![natewiley](https://avatars.githubusercontent.com/u/5630902?v=4)](https://github.com/natewiley "natewiley (3 commits)")[![avr](https://avatars.githubusercontent.com/u/347482?v=4)](https://github.com/avr "avr (3 commits)")[![stephenway](https://avatars.githubusercontent.com/u/38894?v=4)](https://github.com/stephenway "stephenway (3 commits)")[![marcelombc](https://avatars.githubusercontent.com/u/1358796?v=4)](https://github.com/marcelombc "marcelombc (2 commits)")[![mikedamage](https://avatars.githubusercontent.com/u/7166?v=4)](https://github.com/mikedamage "mikedamage (2 commits)")[![millien](https://avatars.githubusercontent.com/u/5214199?v=4)](https://github.com/millien "millien (2 commits)")[![tanmancan](https://avatars.githubusercontent.com/u/8162990?v=4)](https://github.com/tanmancan "tanmancan (2 commits)")

### Embed Badge

![Health badge](/badges/fabianobn-slick/health.svg)

```
[![Health](https://phpackages.com/badges/fabianobn-slick/health.svg)](https://phpackages.com/packages/fabianobn-slick)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M290](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
