Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
react and next.js parallax

Hi I am trying to replicate the parallax effect from this wordpress website https://cfs-me.com/ on react and next.js.

I am trying to achieve this with react-scroll-parallax npm package.

my _app.js file is.....

import TopNav from '../components/TopNav';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'antd/dist/antd.css';
import { ParallaxProvider } from 'react-scroll-parallax';
import '../public/css/styles.css';

function MyApp ({ Component, pageProps }) {
    return (
    <>
        <TopNav />
        <ParallaxProvider>
            <Component {...pageProps} />;
        </ParallaxProvider>
    </>
    )
}

export default MyApp;

and in the index.js....

import Image from 'next/image'
import { Parallax } from 'react-scroll-parallax'

const Index = () => {
    return (
        <>

            <div className="content">
                <Parallax offsetYMin={200} offsetYMax={1500}>
                    <h1 className="jumbotron text-center bg-primary titlemain">hello</h1>

                </Parallax>
                <Parallax offsetYMin={-500} offsetYMax={2000}>
                    <Image src="/public/images/tree-geec0e486b_1920.jpg" layout="fill" />
                </Parallax>

            </div>

            <style jsx>{`
              .titlemain {
              color: white;
              margin: 0;
              height: 300px;
              display: flex;
              align-items: center;
              justify-content: center;
              }
            `}</style>
        </>
    )
};

export default Index;

I cant get the image to load, and I don't quite understand the two parallax elements that I got from the docs. Chrome developer tools reads them as inner and outer. Any help would be greatly appreciated. Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!