1.0.0 • Published 4 years ago

@boatzako/ngx-parallax-scroll v1.0.0

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

NgxParallaxScroll

License Minified

Parallax scroll for Angular9+. Demo

Getting Started

You can install @boatzako/ngx-parallax-scroll by using npm.

npm install @boatzako/ngx-parallax-scroll --save

Usage

Import ngx-parallax-scroll module

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';

import { NgxParallaxScrollModule } from '@boatzako/ngx-parallax-scroll'; // <-- add

@NgModule({
  imports: [
    BrowserModule, 
    NgxParallaxScrollModule  // <-- add
  ],
  declarations: [ 
    AppComponent,
  ],
  bootstrap: [ AppComponent ]
})
export class AppModule { }

Then in HTML

<ngx-parallax-scroll>
  <img parallax-img src="/assets/your-image.jpg" alt="">
</ngx-parallax-scroll>

API.

Component

Selector: ngx-parallax-scroll

Inputs

InputTypeDefaultRequiredDescription
styleClassstringnoStyle class of the component.

Directive

Selector: parallax-img

Inputs

InputTypeDefaultRequiredDescription
rationumber1nospeed when scrolling

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details