Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ngx-parallax-scroll
Advanced tools
This is a simple angular plugin, that allows us to implement parallax effect for some element in page
This is a simple angular plugin, that allows us to implement parallax effect for some element in page.
Example application: https://ngx-parallax-scroll.stackblitz.io
StackBlitz example: https://stackblitz.com/edit/ngx-parallax-scroll
Install from npm:
npm i ngx-parallax-scroll --save
Reference the directive in the main module:
import { NgxParallaxScrollModule } from 'ngx-parallax-scroll';
Then in your base module:
@NgModule({
imports: [
...,
NgxParallaxScrollModule,
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
Use the component, providing content for parallax effect, and config.
In template:
<ngx-parallax-scroll [config]="ngParallaxConf">
<img src="..." class="parallax-img" alt="parallax-img">
</ngx-parallax-scroll>
In component:
import { Component } from '@angular/core';
import { IParallaxScrollConfig } from 'ngx-parallax-scroll';
@Component({
...
})
export class AppComponent {
ngParallaxConf: IParallaxScrollConfig = {
parallaxSpeed: 1,
parallaxSmoothness: 1,
parallaxDirection: 'reverse',
parallaxTimingFunction: 'ease-in',
parallaxThrottleTime: 80
};
}
Use the directive, providing properties:
<img src="..."
class="parallax-img"
alt="parallax-img"
ngxParallaxScroll
[parallaxSpeed]='1'
[parallaxSmoothness]='1'
[parallaxDirection]='"straight"'
[parallaxTimingFunction]='"linear"'
[parallaxThrottleTime]='0'>
or providing config:
<img src="..."
class="parallax-img"
alt="parallax-img"
ngxParallaxScroll
[config]="ngParallaxConf">
Attribute | Type | Optinal | Default | Description |
---|---|---|---|---|
parallaxSpeed | number | no | - | Set scroll-speed behavior on scroll event |
parallaxSmoothness | number | no | - | Set smooth effect (css transition time) |
parallaxDirection | string | yes | straight | Set element movement direction ('straight' or 'reverse') |
parallaxTimingFunction | string | yes | linear | Set css timing-function. Accept timing-function |
parallaxThrottleTime | number | yes | 0 | Set throttling for scroll event |
MIT
FAQs
This is a simple angular plugin, that allows us to implement parallax effect for some element in page
The npm package ngx-parallax-scroll receives a total of 22 weekly downloads. As such, ngx-parallax-scroll popularity was classified as not popular.
We found that ngx-parallax-scroll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.