msp/slick

Magento 2 wrapper for kenwheeler/slick

Installs: 34 601

Dependents: 1

Suggesters: 0

Security: 0

Stars: 8

Watchers: 12

Forks: 4

Open Issues: 1

Language:CSS

Type:magento2-module

0.2.0 2018-10-23 08:31 UTC

This package is auto-updated.

Last update: 2024-11-09 01:00:43 UTC


README

This module lets you use Slick with Magento 2 throught requirejs

Installation

composer require msp/slick
bin/magento setup:upgrade

Usage

Initialization

You can init the slider with data-mage-init:

<div class="your-class" data-mage-init='{
    "slick": {
      ...
      "autoplay"          :   true,
      ...
    }
}'>
  <div>your content</div>
  <div>your content</div>
  <div>your content</div>
</div>

or with a <script type="text/x-magento-init">:

<div id="your-id" class="your-class">
  <div>your content</div>
  <div>your content</div>
  <div>your content</div>
</div>
<script type="text/x-magento-init">
     {
         "#your-id": {
             "slick": {
                ...
                "autoplay"          :   true,
                ...
             }
         }
     }
 </script>