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-ts-starter
mkdir my-new-project
cd my-new-project
npx react-vite-ts-starter
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-ts-starter.git
cd react-vite-js-starter
This command will install all required dependencies, including React, Tailwind CSS, Axios, React Icons, and Sass.
npm install
Run the following command to start the development server:
npm run dev
Open http://localhost:5173 to view the app in the browser.
āāā public/ # Static files
āāā src/ # Source files
ā āāā home/ # Home component
ā ā āāā Home.tsx # Main Home page component
ā āāā App.tsx # Main application component
ā āāā main.tsx # Application entry point
ā āāā index.css # Tailwind CSS imports
ā āāā App.css # Additional CSS (optional)
āāā tailwind.config.ts # Tailwind CSS configuration
āāā postcss.config.ts # 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:
src/home/Home.jsx
.To add new pages and routes:
src/pages
folder (e.g., About.tsx
).App.tsx
to 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.ts
file:
module.exports = {
theme: {
extend: {
colors: {
primary: "#1E40AF",
},
},
},
};
Contributions are welcome!
To contribute:
This project is licensed under the MIT License.