Slick Carousel
A slideshow component for cycling through elements—images or slides of text—like a carousel.
How it works
Space has taken the advantage of Slick carousel and extended it with dozens of new options. The carousel is a slideshow for cycling through a series of content, built with CSS 3D transforms and a bit of JavaScript. It works with a series of images, text, or custom markup. It also includes support for previous/next controls and indicators.
How to use?
Copy-paste the stylesheet <link>
into your <head>
to load the CSS.
Copy-paste the following <script>
s near the end of your pages under JS Implementing Plugins to enable them.
Copy-paste the following <script>
near the end of your pages under JS Space to enable it.
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
Arrows
.u-slick__arrow-centered--y
class provides vertical center alignment, and .u-slick__arrow-centered--y
horizontal center alignment for arrow classes. Use within data-arrows-classes
attribute.
Paginations
.u-slick__pagination-centered--y
class provides vertical center alignment for pagination classes (for vertical paginations). Use within data-pagi-classes
attribute.
White pagination
.u-slick__pagination--white
class must be used along with .u-slick__pagination
as a modifier to provide white style paginations.
Equal height
With the use of .u-slick--equal-height
class, turn your carousel contents into equal height blocks.
Others
There are a couple of other predefined classes to make carousel contents easy to control and decorate them with some stylish design.
Class | Description |
---|---|
|
Adds 4px spacing between slides. |
|
Adds 8px spacing between slides. |
|
Adds 16px spacing between slides. |
Methods
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-nav-for=""
.
Attribute | Description |
---|---|
|
The ID of the carousel with which it will be synchronized. |
|
Set to true , to preview for the other carousel. |
|
Lists the common classes for prev and next. |
|
Lists the common classes for prev. |
|
Lists the common classes for next. |
|
Lists the common classes for pagination. |
|
If data-numbered-pagination="true" is set to true , then it is a preview for the other carousel. List of classes to control the style of numbered pagination:
|
|
Inserts additional <span class="u-dots-helper"></span> markup for. |
|
An auxiliary icon for pagination. |
|
The amount of default slides. |
|
The number of slides scrolled at a time. |
|
If true , the automatic slide switch is turned on. |
|
Animation smoothness. Possible values:
|
|
Animation smoothness if you use the jquery.easing.js libraries For more detailed information, ses jQuery easing documentation. |
|
If true , the slide effect is replaced by fade . |
|
If data-autoplay="" is set to true , it sets the time at which the next slide will be displayed. The value is in ms . |
|
Number of rows in a slide |
|
If true , the carousel is always centered, and the central slide is always visible, and the rest can go beyond the visibility zone. |
|
If data-center-mode="" is set to true , determines how many pixels the last slides are visible. |
|
If set to true , pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave . If set to false , hovering over the carousel won't pause it. |
|
If true , you can specify slides of different widths. |
|
Specifies which slide will be the starting one, that is if it is necessary for the slider to start to scroll not from the first slide. |
|
If true , the slides are scrolled vertically. |
|
If true , slides are scrolled from right-to-left (RTL).
Note! You will need to add |
|
Revealing effect of slides. All effects are tied to the library animate.css . |
|
Disappearing effect of slides. All effects are tied to the library animate.css . |
|
If true , the slides are looped. |
|
If true , adds a slide title to the inside of the dot pagination. |
|
If true , after clicking on a slide, it becomes central. |
|
Image loading mode. It has 2 values:
data-lazy attribute, instead of src .
|
|
If data-adaptive-height="" is set to true , auto height mode will be enabled. |
|
Allows you to change the values of different parameters at different resolutions. |
Official Documentation
For more detailed information, see the official documentation: Slick carousel.