Socket
Socket
Sign inDemoInstall

ngx-smooth-parallax

Package Overview
Dependencies
5
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ngx-smooth-parallax

``` npm i ngx-smooth-parallax ``` ### Import module ``` import { NgxSmoothParallaxModule } from 'ngx-smooth-parallax';


Version published
Maintainers
1
Install size
134 kB
Created

Readme

Source

NgxSmoothParallax

DEMO

Get started:

Install:

npm i ngx-smooth-parallax

Import module

import { NgxSmoothParallaxModule } from 'ngx-smooth-parallax';

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

User directive with overflow:hidden wrapper:

<div class="scroll-element" style="height: 200vh">
  <div class="parallax-wrapper" style="overflow:hidden">
    <ngx-smooth-parallax [startOffsetParallax]="300">
      <img
        style="height:200px"
        [parallax]="true"
        src="https://picsum.photos/1000/300"
      />
    </ngx-smooth-parallax>
  </div>
  <div>
    Content
  </div>
</div>

Options

NameDescription
parallaxtype:boolean : True to enable parallax effect, otherwise false to turn it off. Default: true
startOffsetParallaxtype: number Offset top to start parallax Default: 0
scrollVelocitytype: number The parallax velocity, value from 0 - 10 Default: 0

FAQs

Last updated on 08 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc