Awesome Open Source
Awesome Open Source


Support angular 6+, Slick 1.8.1



To install this library, run:

$ npm install ngx-slick --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install ngx-slick

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { SlickModule } from 'ngx-slick';

  declarations: [
  imports: [

    // Specify your library as an import
  providers: [],
  bootstrap: [AppComponent]
export class AppModule { }
  • Include jquery and slick css/js in your application :
<link rel="stylesheet" type="text/css" href="//[email protected]/slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="//[email protected]/slick/slick-theme.css"/>

<script src="//"></script>
<script src="//[email protected]/slick/slick.js"></script>

Once your library is imported, you can use its components, directives and pipes in your Angular application:

  <!-- You can now use your library component in app.component.html -->
    <ngx-slick class="carousel" #slickModal="slick-modal" [config]="slideConfig" (afterChange)="afterChange($event)">
        <div ngxSlickItem *ngFor="let slide of slides" class="slide">
              <img src="{{ slide.img }}" alt="" width="100%">

    <button (click)="addSlide()">Add</button>
    <button (click)="removeSlide()">Remove</button>
    <button (click)="slickModal.slickGoTo(2)">slickGoto 2</button>
    <button (click)="slickModal.unslick()">unslick</button>
  slides = [
    {img: ""},
    {img: ""},
    {img: ""},
    {img: ""}
  slideConfig = {"slidesToShow": 4, "slidesToScroll": 4};

  addSlide() {
    this.slides.push({img: ""})

  removeSlide() {
    this.slides.length = this.slides.length - 1;

  afterChange(e) {


To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint


MIT © Mark

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (68,103
angular (1,265
ui (985
jquery (514
angular2 (233
slick (19

Find Open Source By Browsing 7,000 Topics Across 59 Categories