
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
react-parallax
Advanced tools
Position calculation has changed in version 1.0.0 to get rid of some white space edge cases on large screens. I hope it does not break your current setup. In some cases you will have to adjust the strength
value.
npm install react-parallax --save
import { Parallax } from 'react-parallax';
const TheContainer = React.createClass({
render: function () {
return (
<div>
<Parallax bgImage="assets/1.jpg" strength={400}>
<br/>
<h1> some content that is displayed above the bgImage </h1>
</Parallax>
</div>
)
}
});
For more flexibility and styling purposes you can add a <Background></Background>
section to your Parallax Container. Child nodes inside this Background will be positioned like the bgImage behind the other children. Compared to the bgImage there is no automatic scaling.
import { Parallax, Background } from 'react-parallax';
const TheContainer = React.createClass({
render: function () {
return (
<div>
<Parallax strength={300}>
<Background>
<img src="http://www.fillmurray.com/400/300"/>
<div style={{
width: 800,
height: 300,
backgroundColor: '#450093'
}}></div>
<img src="http://www.fillmurray.com/500/300"/>
</Background>
<h1>something else</h1>
</Parallax>
</div>
)
}
});
The children are used to display any content inside the react-parallax component
Initial set up, run:
npm install
For watch on files, live reload, JSX transpiling and browserify, run:
npm run dev
Port on Windows is 80, 8080 on all other OS by default. Can be set with option -port=8080
MIT
FAQs
A React Component for parallax effect working in client-side and server-side rendering environment
The npm package react-parallax receives a total of 13,641 weekly downloads. As such, react-parallax popularity was classified as popular.
We found that react-parallax demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.