Saturday, 18 April 2026

page bana jisse har section pe naya page aa jaye

 Samajh gaya bhai — tu “scroll pe next section / page jaisa feel” wali website banana chahta hai (like Apple, landing pages, etc.).

Isko bolte hain πŸ‘‰ Single Page Scroll Website (sections instead of pages)


🧠 Concept simple hai:

  • Ek hi page hota hai

  • Usme multiple sections (divs) hote hain

  • Har section = ek “page jaisa feel”

  • Scroll karte hi next section full screen pe aata hai


πŸ”₯ Basic React Example (Full Working)

πŸ“ Structure

src/
 ├── App.jsx
 ├── App.css

✅ App.jsx

import './App.css';

function App() {
  return (
    <div className="container">

      <section className="section section1">
        <h1>Welcome to the World of Automation</h1>
        <p>Easytrain</p>
      </section>

      <section className="section section2">
        <h1>Our Services</h1>
        <p>We build smart automation solutions</p>
      </section>

      <section className="section section3">
        <h1>About Us</h1>
        <p>We are a tech-driven company</p>
      </section>

      <section className="section section4">
        <h1>Contact</h1>
        <p>Get in touch with us</p>
      </section>

    </div>
  );
}

export default App;

🎨 App.css

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
}

.section {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

/* Different colors for sections */
.section1 {
  background: #111;
  color: white;
}

.section2 {
  background: #007bff;
  color: white;
}

.section3 {
  background: #28a745;
  color: white;
}

.section4 {
  background: #ffc107;
  color: black;
}

✨ Result kya hoga:

  • Har scroll pe ek naya “page-like section”

  • Smooth snapping effect πŸ”₯

  • Modern landing page feel


πŸš€ Advanced (next level banana hai?)

Agar tu aur pro banana chahta hai toh use kar:

  • framer-motion → animations

  • react-scroll → smooth navigation

  • locomotive-scroll → premium scrolling feel


🧠 Real world example:

  • Apple website 🍎

  • Tesla website πŸš—

  • Startup landing pages


Agar tu bole toh main tujhe:
πŸ‘‰ animation + navbar + smooth scroll + modern UI wala full project bana ke de sakta hoon (resume level πŸ”₯)

No comments:

Post a Comment

Hello

page bana jisse har section pe naya page aa jaye

 Samajh gaya bhai — tu “scroll pe next section / page jaisa feel” wali website banana chahta hai (like Apple, landing pages, etc.). Isko bo...