Angular Slick Carousel/Slider Example

By Hardik Savani May 2, 2024 Category : Angular


In this tutorial, i will show you angular carousel slider example. if you want to see example of angular slick slider example then you are a right place. In this article, we will implement a angular slick carousel example. Here you will learn slick carousel in angular.

ngx-slick-carousel package provide to adding slider to your angular project. here we will see slick carousel simple example with preview, you can also create slick carousel with angular 6, angular 7, angular 8, angular 9, angular 10, angular 11, angular 12, angular 13, angular 14, angular 15, angular 16 and angular 17 version.


Step 1: Create New App

You can easily create your angular app using bellow command:

ng new myNewApp

Step 2: Install npm Package

Now in this step, we need to just install jquery, slick-carousel and ngx-slick-carousel in our angular application. so let's add as like bellow:

npm install jquery --save

npm install slick-carousel --save

npm install ngx-slick-carousel --save

Step 3: Import SlickCarouselModule

we will import SlickCarouselModule module as like bellow code:


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

import { NgModule } from '@angular/core';

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

import { SlickCarouselModule } from 'ngx-slick-carousel';


declarations: [



imports: [




providers: [],

bootstrap: [AppComponent]


export class AppModule { }

now we also need to import js and css into our angular.json file. do it as like bellow:



"styles": [




"scripts": [





Step 4: Update Ts File

here, we need to update ts file as like bellow:


import { Component } from '@angular/core';


selector: 'app-root',

templateUrl: './app.component.html',

styleUrls: ['./app.component.css']


export class AppComponent {

title = 'ng-carousel-demo';

slides = [

{img: ""},

{img: ""},

{img: ""},

{img: ""},

{img: ""},

{img: ""},

{img: ""}


slideConfig = {"slidesToShow": 4, "slidesToScroll": 4};

slickInit(e) {

console.log('slick initialized');


breakpoint(e) {



afterChange(e) {



beforeChange(e) {




Step 5: Update HTML File

here, we need to update html file as like bellow code:


<h1>Angular Slick Carousel/Slider Integration Tutorial -</h1>

<ngx-slick-carousel class="carousel"







<div ngxSlickItem *ngFor="let slide of slides" class="slide">

<img src="{{ slide.img }}" alt="" width="100%">



Step 6: Update CSS File

now you can update css file as like bellow:


.slick-slider {

width: 88%;

margin: auto;

background: rgb(14, 13, 13);


body .slick-prev,

body .slick-next {

height: 45px;

width: 40px;

background: #575d59 !important;

z-index: 100;


Now you can run by bellow command:

ng serve

now you can check it.

I hope it can help you...

Tags :