Welcome to the React Vite Starter project! This project is built with modern tools to quickly start a React app with Vite, Tailwind CSS, and essential libraries like Axios and React Icons.
npx react-vite-js-startermkdir my-new-project
cd my-new-project
npx react-vite-js-starter
- β‘ Vite - Fast and optimized React development experience.
- π¨ Tailwind CSS - Utility-first CSS framework for rapid UI development.
- π React Router - Simple and declarative routing.
- π Axios - Promise-based HTTP client.
- π React Icons - Thousands of popular icons as components.
- π¨ Sass - Powerful CSS preprocessor.
Make sure you have the following installed:
Follow these steps to set up and run the project on your local machine.
git clone https://github.com/anasyakubu/react-vite-js-starter.git
cd react-vite-js-starterThis command will install all required dependencies, including React, Tailwind CSS, Axios, React Icons, and Sass.
npm installRun the following command to start the development server:
npm run devOpen http://localhost:5173 to view the app in the browser.
βββ public/ # Static files
βββ src/ # Source files
β βββ home/ # Home component
β β βββ Home.jsx # Main Home page component
β βββ App.jsx # Main application component
β βββ main.jsx # Application entry point
β βββ index.css # Tailwind CSS imports
β βββ App.css # Additional CSS (optional)
βββ tailwind.config.js # Tailwind CSS configuration
βββ postcss.config.js # PostCSS configuration
βββ package.json # Project metadata and dependencies
βββ README.md # Project documentation
| Script | Description |
|---|---|
npm install |
Installs all dependencies |
npm run dev |
Starts the development server |
npm run build |
Builds the project for production |
npm run preview |
Previews the production build |
You can customize the project as per your requirements.
To modify the home page:
- Edit the file
src/home/Home.jsx.
To add new pages and routes:
- Create a new component in the
src/pagesfolder (e.g.,About.jsx). - Update
App.jsxto include the new route:
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
</Routes>You can extend the Tailwind CSS theme by editing the tailwind.config.js file:
module.exports = {
theme: {
extend: {
colors: {
primary: "#1E40AF",
},
},
},
};Contributions are welcome!
To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes.
- Submit a pull request.
This project is licensed under the MIT License.
- Author: Anas Yakubu
- GitHub: https://github.com/anasyakubu
- Portfolio: https://anasyakubu.vercel.app