0.1.3 • Published 2 years ago

ngx-basic-carousel v0.1.3

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

NgxBasicCarousel

npm demo

About

This library was generated with Angular CLI version 13.3.0.

This is a package for a carousel on Angular..

Install

npm install ngx-basic-carousel

Import

In your app.module.ts file

// ...
import { NgxBasicCarouselModule } from 'ngx-basic-carousel';

@NgModule({
  // ...
  imports: [
    // ...
    NgxBasicCarouselModule,
    // ...
  ]
})
export class AppModule {}

Usage

<lib-ngx-basic-carousel></lib-ngx-basic-carousel>

Attributes

Basic options
InputTypeDescriptionDefault value
slidesSlide []An array of Slide.[]
intervalnumberLoop interval in milliseconds.3000
widthstringwidth value in px.650px
heightstringheight value in px.326px

example:

<lib-ngx-basic-carousel [slides]="mySlides"
                        [interval]="1000"
                        width="1920px"
                        height="1080px"></lib-ngx-basic-carousel>
Dots customisation
InputTypeDescriptionDefault value
showDotsbooleanDisplay dots navigation.true
activeDotColorstringActive dot color .#000
inactiveDotColorstringInactive dot color.#fff

Type reference

Slide

interface Slide {
  image: string;
  targetLink: string;
}
PropertyTypeDescription
imagestringImage url.
targetLinkstringRedirection link if the slide is clickable, if there is no link the slide will not be clickable.

Test the package locally

Clone the package repo : git clone https://github.com/MadiNaf/ngx-basic-carousel .

Build the package : ng build ngx-basic-carousel.

Create a symlink in your npm global folder, go to: ~/dist/ngx-basic-carousel and run npm link.

To verify that everything was done correctly, you can check whether the symlink for the package has been created using the following command: npm ls --depth=0 --link=true. Now you need to create a new angular projet: ng new test-pkg, go to the project folder and link your project with the package : npm link ngx-basic-carousel. After that you can import and use the package like we do when we use npm install instead of npm link.

0.1.3

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago