ngx-flip-flip
Version:
Angular Flip Flip - Angular full page scrolling components with no dependencies
104 lines (83 loc) • 2.19 kB
Markdown
# ngx-flip-flip
Angular Flip Flip - Angular full page scrolling components with no dependencies
---
[Demo](https://ngx-flip-flip.netlify.com/)
---
## Installation
NPM:
`npm i ngx-flip-flip --save`
Yarn:
`yarn add ngx-flip-flip`
## Sample
Include NgxFlipFlipModule in your main module:
```typescript
import { NgxFlipFlipModule } from 'ngx-flip-flip';
export class AppModule { }
```
Then use in your component:
```typescript
import { Component } from '@angular/core';
export class SampleComponent {}
```
## Options
Change options
```typescript
import { Component } from '@angular/core';
import { NgxFlipFlipOptions } from 'ngx-flip-flip'
export class SampleComponent {
options: NgxFlipFlipOptions = {
scrollingSpeed: 300, // Scrolling speed - number
fitToSectionDelay: 300, // Fit to section delay - number
easing: 'linear', // animation type. One of 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end'
startFromSlide: 1, // start from this slide - number
keyboardScrolling: false // should keyboard scrolling work - boolean
}
}
```
On slide change event
```typescript
import { Component } from '@angular/core';
import { NgxFlipFlipOptions, Direction } from 'ngx-flip-flip'
export class SampleComponent {
handleSlideChange(direction: Direction) {
// do some stuff
}
}
```