Back to all posts

How to Build a Portfolio Website Using React and Tailwind (2025 Guide)

β€’
How to Build a Portfolio Website Using React and Tailwind (2025 Guide)

In the digital-first world of 2025, your online portfolio is more important than ever. Whether you’re a developer, designer, or freelancer, a well-designed portfolio helps showcase your skills, attract clients, and land job opportunities.

In this tutorial, we’ll walk you through how to build a sleek portfolio website using React and Tailwind CSSβ€”a powerful combination for fast and responsive UI development.


πŸ› οΈ Why React + Tailwind?

  • React: Component-based, fast, and widely used in modern web development.
  • Tailwind CSS: Utility-first CSS framework that allows rapid design without writing custom CSS.

Together, they offer speed, flexibility, and a clean developer experience.


🧱 Step 1: Set Up the Project

First, make sure you have Node.js and npm/yarn installed.

1. Create React App with Vite:

npm create vite@latest my-portfolio --template react
cd my-portfolio
npm install

2. Install Tailwind CSS:

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

3. Configure tailwind.config.js:

content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],

4. Add Tailwind to src/index.css:

@tailwind base;
@tailwind components;
@tailwind utilities;

🎨 Step 2: Build the Portfolio Layout

Folder Structure:

src/
β”œβ”€β”€ components/
β”‚ β”œβ”€β”€ Header.jsx
β”‚ β”œβ”€β”€ Hero.jsx
β”‚ β”œβ”€β”€ About.jsx
β”‚ β”œβ”€β”€ Projects.jsx
β”‚ └── Contact.jsx
β”œβ”€β”€ App.jsx
└── index.css

🧩 Step 3: Create Key Components

βœ… Header.jsx

function Header() {
return (
<header className="p-4 flex justify-between items-center bg-white shadow">
<h1 className="text-xl font-bold">MyPortfolio</h1>
<nav className="space-x-4">
<a href="#about" className="hover:text-blue-500">About</a>
<a href="#projects" className="hover:text-blue-500">Projects</a>
<a href="#contact" className="hover:text-blue-500">Contact</a>
</nav>
</header>
);
}
export default Header;

βœ… Hero.jsx

function Hero() {
return (
<section className="h-screen flex flex-col justify-center items-center text-center bg-gradient-to-br from-blue-100 to-white">
<h2 className="text-4xl font-bold mb-2">Hi, I’m Jane Doe πŸ‘‹</h2>
<p className="text-xl text-gray-700">Frontend Developer | UI/UX Enthusiast</p>
</section>
);
}
export default Hero;

βœ… Projects.jsx

const projects = [
{ name: "Portfolio Website", link: "#", desc: "React + Tailwind portfolio." },
{ name: "Todo App", link: "#", desc: "Full-stack MERN app." },
];

function Projects() {
return (
<section id="projects" className="p-8 bg-gray-50">
<h3 className="text-3xl font-bold text-center mb-6">Projects</h3>
<div className="grid md:grid-cols-2 gap-6">
{projects.map((project, idx) => (
<div key={idx} className="p-4 border rounded shadow">
<h4 className="text-xl font-semibold">{project.name}</h4>
<p className="text-gray-600">{project.desc}</p>
<a href={project.link} className="text-blue-600 hover:underline">View Project β†’</a>
</div>
))}
</div>
</section>
);
}
export default Projects;

πŸ’¬ Step 4: Add Contact Form

βœ… Contact.jsx

function Contact() {
return (
<section id="contact" className="p-8 bg-white">
<h3 className="text-3xl font-bold text-center mb-6">Contact Me</h3>
<form className="max-w-md mx-auto space-y-4">
<input type="text" placeholder="Name" className="w-full p-2 border rounded" />
<input type="email" placeholder="Email" className="w-full p-2 border rounded" />
<textarea placeholder="Message" className="w-full p-2 border rounded h-32"></textarea>
<button type="submit" className="w-full p-2 bg-blue-600 text-white rounded">Send</button>
</form>
</section>
);
}
export default Contact;

πŸ“¦ Step 5: Combine in App.jsx

import Header from './components/Header'
import Hero from './components/Hero'
import Projects from './components/Projects'
import Contact from './components/Contact'

function App() {
return (
<div>
<Header />
<Hero />
<Projects />
<Contact />
</div>
)
}
export default App

πŸš€ Bonus Tips for 2025

  • βœ… Deploy with Vercel or Netlify in seconds.
  • 🎯 Use React Helmet or Vite-plugin-ssr for SEO optimization.
  • πŸŒ™ Add dark mode support using Tailwind’s dark variant.
  • πŸ“± Ensure full mobile responsiveness with Tailwind’s utility classes.

🧠 Final Thoughts

With React’s flexibility and Tailwind’s rapid styling, building a portfolio in 2025 is faster and cleaner than ever. Whether you’re looking to impress recruiters or clients, a modern portfolio site is your personal brand’s digital storefront.

Featured Ad

Calmixo logo

πŸŒ™ Calmixo – Your Personal Wellness Companion

Relax, Meditate, and Sleep Better with Calmixo. Explore soothing sounds, guided meditations, and calming playlists curated just for you.✨ Start your wellness journey today – because peace of mind matters.

Download Now
How to Build a Portfolio Website Using React and Tailwind (2025 Guide) | AB Web Tech Blog