1.1.1 • Published 3 years ago

slider-carousel v1.1.1

Weekly downloads
89
License
MIT
Repository
github
Last release
3 years ago

slider-carousel | Angular 10

Angular component of the carousel, using the slider as a transition. This is a simple, clean and light alternative. It also does not need dependencies.

Compatible with previous versions of Angular, except AngularJS.

Use example (more examples).

<slider-carousel [images]="example.images"></slider-carousel>

npm.io

Usage

Install

npm install slider-carousel

Import into Module

import { SliderCarouselModule } from 'slider-carousel';

@NgModule({
  imports: [
    ...,
    SliderCarouselModule
  ],
  declarations: [...],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Import into style.scss file application.

@import '~slider-carousel/slider-carousel.scss';
@include slider-carousel();

Or import with colors (default color and background color)

@import '~slider-carousel/slider-carousel.scss';
@include slider-carousel($defaultColor, $bgColor);

API

Inputs/Outputs (Required)

NameTypeDescription
imagesstring[] or { lg: string, md?: string, sm?: string }[]Address list of the images to be displayed. He accept an array of object (with the sizes of each images) or a simple array of string.

Inputs/Outputs (Optional)

NameTypeDefaultDescription
previewbooleantrueTo open full image. (ex .: <... [preview]="true"></...>).
auto-sizestring'100%'Images are displayed each with their respective but responsive measurements. (ex .: <... [auto-size]="true"></...>).
heightstring'500px'Define a fixed height to container. (ex .: <... height="350px"></...>).
widthstring'100%'Define a fixed width to container. (ex .: <... width="300px"></...>).
max-widthstring'100%'Define a max width to container. (ex .: <... max-width="800px"></...>).

Understand images sizes

The sm is thumbnail and md is carousel image:

npm.io

The lg is full image on preview mode:

npm.io

1.1.1

3 years ago

1.1.0

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago