Portfolio Website
Alright Developer let's get start. creating a portfolio website is a great way to showcase your skills, projects and experience. so, today we are going to build a simple portfolio website using React.
First, ensure you have Node.js installed. you can download it from Node.js
Run the following command to create a new React project using Vite:
npm create vite@latest portfolio
Then, navigate into the project directory:
cd my-portfolio
npm install
npm run dev
Your project will now be running at http://localhost:5173
.
Organize your project in a clean structure:
my-portfolio/
│── public/
│── src/
│ │── components/
│ │ │── Navbar.jsx // Make each component diff. CSS file
│ │ │── Hero.jsx
│ │ │── About.jsx
│ │ │── Footer.jsx
│ │── App.jsx
│ │── main.jsx
│── index.html
│── package.json
Create Navbar.jsx
inside the components/
folder.
import React from 'react';
const Navbar = () => {
return (
<nav>
<h1>My Portfolio</h1>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
);
};
export default Navbar;
Create Hero.jsx
inside components/
.
import React from 'react';
const Hero = () => {
return (
<section>
<h2>Welcome to My Portfolio</h2>
<p>Hi, I'm a software developer passionate about creating amazing applications.</p>
</section>
);
};
export default Hero;
Create About.jsx
inside components/
.
import React from 'react';
const About = () => {
return (
<section id="about">
<h2>About Me</h2>
<p>I am a React developer with experience in building web applications.</p>
</section>
);
};
export default About;
Create Footer.jsx
inside components/
.
import React from 'react';
const Footer = () => {
return (
<footer>
<p>© 2025 My Portfolio. All rights reserved.</p>
</footer>
);
};
export default Footer;
Modify App.jsx
to include all components.
import React from 'react';
import Navbar from './components/Navbar';
import Hero from './components/Hero';
import About from './components/About';
import Footer from './components/Footer';
const App = () => {
return (
<>
<Navbar />
<Hero />
<About />
<Footer />
</>
);
};
export default App;
Start the development server to see your portfolio website in action:
npm run dev
Open http://localhost:5173/
in your browser.
You have successfully created a simple portfolio website using React Vite. This website includes a Navbar, Hero Section, About Section, and Footer. You can enhance it by adding more sections like Projects, Contact Form, or Testimonials.
Join Kiran on Peerlist!
Join amazing folks like Kiran and thousands of other people in tech.
Create ProfileJoin with Kiran’s personal invite link.
0
4
1