Open In App

Portfolio Website using React

Last Updated : 06 Mar, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Portfolio Website using React is an online representation of the talent and skills one possesses, along with details of past work and contact information. it is very important for any professional.

Preview of Portfolio Website using React

  • Let us have a look at how the final application will look like:
    Protfolio-Webpage-Using-React-(1)

Approach to Create Portfolio Website using React

Steps to create Portfolio Webpage using React

  • Create multiple function-based components like Contact, Hero, Navbar, About, Footer, Project, Skills, etc., and at the end, integrat all files into App.js.
  • Styling and design are implemented through TailWind CSS. We connected Tailwind CSS through CDN inside the index.html file so that whenever someone wants to run this code on a local machine, they can directly run it without installing Tailwind CSS.
  • All the components of this project are stored in a directory called components. All the assets and amenities used in this project are connected in hyperlink form.

Portfolio Website using React Complete Example

The approach outlined above has been implemented in the provided code.

HTML




<!-- Index.html -->
<!DOCTYPE html>
<html lang="en" class="scroll-smooth scroll-pt-20">
 
<head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta name="description" content="Web site created using create-react-app" />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <title>
        Project | PortFolio WebPage using React
    </title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
 
<body class="bg-emerald-100">
    <noscript>You need to enable JavaScript
        to run this app.</noscript>
    <div id="root"></div>
</body>
 
</html>


Javascript




// Index.js
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
 
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
    <React.StrictMode>
        <App />
    </React.StrictMode>
);


Javascript




// App.js
import Navbar from "./components/Navbar";
import About from "./components/About";
import Skills from "./components/Skills";
import Projects from "./components/Projects";
import Contact from "./components/Contact";
import Footer from "./components/Footer";
import Hero from "./components/Hero";
 
export default function App() {
    return (
        <>
            <Navbar />
            <Hero />
            <About />
            <Skills />
            <Projects />
            <Contact />
            <Footer />
        </>
    );
}


Javascript




// Navbar.js
export default function Navbar() {
    return (
        <nav className="w-full px-5 sm:px-10 py-5 shadow-xl
                        backdrop-blur-lg fixed top-0 z-10">
            <div className="container flex flex-col lg:flex-row
                            gap-5 justify-between w-full
                            items-center max-w-5xl mx-auto">
                <h3 className="text-3xl text-emerald-500 font-bold">
                    GeeksforGeeks
                </h3>
                <ul className="flex gap-3 align-center p-1 flex-wrap">
                    <li>
                        <a className="text-sm sm:text-base px-2 lg:px-5
                                      py-2 transition rounded hover:text-white
                                      hover:bg-emerald-600"
                           href="#about">
                        About
                        </a>
                    </li>
                    <li>
                        <a className="text-sm sm:text-base px-2 lg:px-5 py-2
                                      transition rounded hover:text-white
                                      hover:bg-emerald-600"
                            href="#skills">
                            Skills
                        </a>
                    </li>
                    <li>
                        <a className="text-sm sm:text-base px-2 lg:px-5 py-2
                                      transition rounded hover:text-white
                                      hover:bg-emerald-600"
                            href="#projects">
                            Projects
                        </a>
                    </li>
                    <li>
                        <a className="text-sm sm:text-base px-2 lg:px-5 py-2
                                      transition rounded hover:text-white
                                      hover:bg-emerald-600"
                            href="#contact">
                            Contact
                        </a>
                    </li>
                </ul>
            </div>
        </nav>
    );
}


Javascript




// Hero.js
export default function Hero() {
    return (
      <section
        id="hero"
        className="px-10 w-full flex gap-12 flex-col lg:flex-row
                   justify-center items-center align-center mt-40
                   mb-16 lg:mt-10 max-w-5xl mx-auto lg:gap-0 h-[80vh]">
        <div className="flex-1 flex flex-col justify-center items-center gap-5">
          <div>
            <h4 className="text-center text-xl font-bold">
                Hi and welcome to
            </h4>
            <h2 className="text-center text-emerald-500 text-5xl font-bold">
              My Portfolio Website
            </h2>
          </div>
          <p className="text-center">
            I am your friendly neighbourhood osm developer...
          </p>
        </div>
        <div className="flex-1">
          <img src=
               alt="Hello.svg"
               className="w-full h-full bg-cover"/>
        </div>
      </section>
    );
  }


Javascript




// About.js
export default function About() {
    return (
        <section
            id="about"
            className="px-10 w-full flex flex-col lg:flex-row py-20
                       align-center bg-emerald-200 max-w-5xl mx-auto">
            <div className="flex-1">
                <img src=
                    alt="About"
                    className="w-full h-full bg-cover"/>
            </div>
            <div className="flex-1 flex flex-col justify-center
                            items-center gap-5 px-6">
                <div>
                    <h2 className="text-center text-emerald-500
                                   text-5xl font-bold">
                        About Me :
                    </h2>
                </div>
                <p>
                    As I said, I am your friendly
                    neighbourhood osm developer...
                </p>
                <p>
                    I am a passionate self taught developer
                    (which is quite a subjective thing as i learnt from
                    teachers on youtube so does that really counts?
                    idk). I am having an experience of about 4 years
                    and had a deep understanding of creating web products.
                </p>
            </div>
        </section>
    );
}


Javascript




// Skills.js
export default function Skills() {
    const skills = ["Python", "HTML", "CSS", "Javascript", "React", "NextJs"];
    return (
        <section id="skills"
            className="px-10 w-full my-40 max-w-5xl mx-auto">
            <h2 className="text-center text-6xl text-emerald-500 font-bold">
                My Skills...
            </h2>
            <div className="mt-10 flex gap-5 justify-center
                            flex-wrap mx-auto max-w-xl">
                {skills.map((skill, index) => {
                    return (
                        <div key={index}
                             className="cursor-pointer px-12 py-10
                                        rounded bg-emerald-200 text-lg
                                        flex items-center justify-center
                                        font-bold hover:shadow-xl">
                            {skill}
                        </div>
                    )})}
            </div>
        </section>
    )
}


Javascript




// Projects.js
export default function Projects() {
    return (
        <section id="projects"
                 className="my-20 w-full flex flex-col gap-5 align-center max-w-5xl mx-auto">
            <h2 className="text-5xl text-emerald-500 font-bold text-center">
                My Projects
            </h2>
            <div className="p-10 bg-emerald-200 flex flex-col justify-center items-center
                            gap-5 lg:flex-row max-w-5xl mx-auto shadow transition
                            hover:shadow-xl hover:scale-[102%] w-full">
                <div className="w-80 rounded">
                    <a href=
                        className="w-full h-full">
                        <img src=
                             alt="Project 1"
                             className="w-full h-full
                                        bg-cover rounded"/>
                    </a>
                </div>
                <div className="flex flex-col align-center mx-auto gap-4 justify-center flex-1">
                    <h2 className="font-bold text-3xl text-center">
                        <a className="hover:underline"
                            href=
                            DSA Progress Tracker
                        </a>
                    </h2>
                    <p>
                        This is a project built on react which tracks your progess in dsa
                        and stores that in the local storage.
                    </p>
                </div>
            </div>
            <div className="p-10 bg-emerald-200 flex flex-col justify-center items-center gap-5
                            lg:flex-row-reverse max-w-5xl mx-auto shadow transition hover:shadow-xl
                            hover:scale-[102%] w-full">
                <div className="w-80 rounded">
                    <a href=
                       className="w-full h-full">
                        <img src=
                             alt="Project 2"
                             className="w-full h-full bg-cover rounded" />
                    </a>
                </div>
                <div className="flex flex-col align-center mx-auto gap-4 justify-center flex-1">
                    <h2 className="font-bold text-3xl text-center">
                        <a className="hover:underline" href=
                            15 Puzzle Game
                        </a>
                    </h2>
                    <p>
                        15 puzzle game is basically a tile-based game in which there are 16 tiles
                        out of which 1 tile is left empty and the remaining tiles are filled with
                        numbers from 1 to 15 in random order. The user has to arrange all the tiles
                        in numerical order with the rule that they can only move the tile that is
                        a direct neighbor of the empty tile.
                    </p>
                </div>
            </div>
        </section>
    );
}


Javascript




// Contact.js
export default function Contact() {
    return (
        <section id="contact"
                 className="my-40 align-center max-w-5xl mx-auto p-3">
            <h2 className="text-5xl font-bold text-emerald-500 text-center">
                Contact
            </h2>
            <div className="flex gap-5 justify-center
                        my-10">
                <a rel="noreferrer"
                   target="_blank"
                   className="text-center hover:underline"
                   href=
                    Instagram:
                    <span className="font-bold">
                        @geeks_for_geeks
                    </span>
                </a>
                <a rel="noreferrer"
                   target="_blank"
                   className="text-center hover:underline"
                   href=
                    Twitter:
                    <span className="font-bold">
                        @geeksforgeeks
                    </span>
                </a>
            </div>
        </section>
    );
}


Javascript




// Footer.js
export default function Footer() {
    return (
        <section className="p-10 bg-emerald-200 flex justify-center">
            <p className="font-bold">
                Â©Copyright 2023. All rights are reserved by Geeks for Geeks
            </p>
        </section>
    );
}


Output:

Protfolio Webpage Using React example - output

Follow the given link to Build and Host your own Portfolio Website using HTML,CSS and JavaScript.



Similar Reads

How to Build a Portfolio Website using React and Bootstrap ?
In this article, We will build a portfolio website that enables individuals to display professional work, achievements, and skills. The project design not only serves as a digital resume but also allows individuals to present their work in a visually appealing and user-friendly manner. Final Output:[caption width="800"]How to Create a Portfolio Web
12 min read
How to Create a Portfolio Website using HTML CSS and JavaScript ?
In this article, we are going to design and build a portfolio website from scratch using HTML, CSS, and JavaScript. A portfolio website is a website that represents you online on the web pages. It contains different sections like Introduction to Yourself, About You, Your Services, Your Contact Details, and Your Portfolio. We are going to build all
13 min read
Simple Portfolio Website Design using HTML
Being a web developer and having a portfolio helps a lot while applying for opportunities and acts as a showcase of our talent, so in this article, we will learn how to make a simple one-page portfolio by just using HTML. This portfolio might contain some very important information of yours like: About us sectionYour projectsYour achievementsYour c
7 min read
Create a Portfolio Website Template using Tailwind CSS
In this tutorial, we'll guide you through the process of creating a stunning portfolio website using Tailwind CSS, a powerful CSS framework that makes styling web pages easy and efficient. Preview of Final Output: Let us have a look at how the final output will look like. [caption width="800"]Personal Portfolio[/caption]Prerequisites:HTMLCSSTailwin
6 min read
How to Build Portfolio Website And Host It on GitHub Pages?
Having an online portfolio is important for showcasing your skills and accomplishments. GitHub Pages provides a convenient and free platform for hosting your portfolio website. In this article, we will see how to build a Portfolio Website And Host It on GitHub Pages. Table of Content Creating a Portfolio WebsiteUploading into a GitHub RepositoryCre
15 min read
Create a Portfolio App using React-Native
In this article, we are going to Create a portfolio app using React Native. The portfolio app is a simple application that is a collection of a person's qualifications, achievements, work samples, and other relevant materials. It is used to demonstrate one's abilities and suitability for a particular role or program. Preview of final output: Let us
5 min read
PortFolio WebPage using React with dark theme
A portfolio website is one of the best ways to showcase your skills and information to the world. In this article, you will see how to create a portfolio website with a dark theme. Project Preview: Let us have a look at how the final output will look like. [caption width="800"]Final Look[/caption]Prerequisites:React.jsGitHub API for fetching reposi
4 min read
Difference between Responsive Website and Mobile Website
Responsive Website: Responsive websites are websites that are designed to fit all types of devices and adjust website layout to best fit screen size. There is no need to make any other device version of the website to fit small devices. Mobile Website: Mobile websites are websites that are designed to fit especially small devices screen such as mob
3 min read
How to add filter with Portfolio Gallery using HTML, CSS and JavaScript ?
The portfolio gallery is useful when your website contains different types of content or so many contents. With the help of a portfolio gallery, you can easily display all the contents on your front page to the user. But if user wants some specific contents then we need to attach filters on the portfolio. In this article, we will add filters using
8 min read
How to create a Portfolio Gallery using HTML and CSS ?
The portfolio gallery is useful when your website contains different types of content or so much content. With the help of a portfolio gallery, you can easily display all the content on your front page to the user. To create a portfolio gallery we will need only HTML and CSS. We can use JavaScript also but in this article, limits are set so we will
3 min read