1.2.1 • Published 4 years ago

fr-carousel v1.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

Fr-Carousel

Fr-Carousel is a friendly angular carousel component and it supports swipe feature for touch devices.

Demo

https://longhaine.github.io/fr-demos/fr-carousel

Installation

npm install fr-carousel --save

Once installed you need to import the module:

import  {FrCarouselModule}  from  'fr-carousel';

@NgModule({

 ...

 imports:  [FrCarouselModule,  ...],

 ...

})

export class  AppModule  {

}

Usage

<fr-carousel>
	<ng-template FrSlide>
		...
	</ng-template>
	<ng-template FrSlide>
		...
	</ng-template>
	<ng-template FrSlide>
		...
	</ng-template>
</fr-carousel>

FrCarousel

selector: fr-carousel

Inputs

InputTypeDefaultDescription
showNavigationArrowsbooleantrueif true, 'previous' and 'next' navigation arrows will be visible on the slide.
showNavigationIndicatorsbooleantrueIf true, navigation indicators at the bottom of the slide will be visible.
keyboardbooleantrueIf true, allows to interact with carousel using keyboard 'arrow left' and 'arrow right'.
intervalnumber5000Time in milliseconds before the next slide is shown.
animationDurationnumber500Time in milliseconds of sliding animation.
pauseOnHoverbooleantrueIf true, will pause slide switching when mouse cursor hovers the slide.

Methods

MethodDescription
prevprev() => void Navigates to the previous slide.
nextnext() => void Navigates to the next slide.
pausepause() => void Pauses cycling through the slides.
cyclecycle() => void Restarts cycling through the slides from left to right.

FrSlide

selector: ng-template[FrSlide]

Inputs

InputTypeDescription
idstringSlide id that must be unique for the entire document.If not provided, will be generated in the fr-slide-x format.

FrCarouselConfig

A configuration service for the FrCarousel component.

You can inject this service, typically in your root component, and customize its properties to provide default values for all carousels used in the application.

interval animationDuration keyboard pauseOnHover showNavigationArrows showNavigationIndicators

1.2.1

4 years ago

1.2.0

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

1.0.1

4 years ago