Starter template React with Vite, React, Tailwind CSS, React Router, React Hook Form, Vitest, and Testing Library.
Overview
This is a starter project for React with Vite, Tailwind CSS, and Typescript. The starter kit is pre-configured with features like absolute import, Headless UI, React Router, and custom authentication implementation using GoTrue from Netlify.
Features
- Vite: Next Generation Frontend Tooling
- React: JavaScript library for building user interfaces
- Tailwind CSS: Utility-first CSS framework for rapidly building custom designs
- Headless UI: Styled and fully accessible UI components
- Hero Icons: Beautiful hand-crafted SVG icons
- Typescript: Strongly typed programming language
- React Router DOM: Declarative routing for React
- React Hook Form: Performant, flexible, and extensible forms with easy-to-use validation
- React Testing Library: Light-weight solution for testing React components
- Vitest: Blazing Fast Unit Test Framework
- ESLint: Find and fix problems in your JavaScript code
- Prettier: An opinionated code formatter
Installation
To install the starter project, follow these steps:
- Replace “myapp-name” with your actual application name.
- Run the following command to install the dependencies:
- NPM:
npm install - Yarn:
yarn - PNPM:
pnpm install
- To start the application in development mode with hot reload, use one of the following commands:
- NPM:
npm run dev - Yarn:
yarn dev - PNPM:
pnpm dev
- To build the application for production, use one of the following commands:
- NPM:
npm run build - Yarn:
yarn build - PNPM:
pnpm build
- To preview the generated build, use one of the following commands:
- NPM:
npm run preview - Yarn:
yarn preview - PNPM:
pnpm preview
- The application will run at http://localhost:3000.
For more detailed information on how things work, refer to the Vite documentation.
Summary
This is a starter project for React that includes various useful features and libraries such as Vite, Tailwind CSS, and Typescript. It comes pre-configured with tools like React Router, React Hook Form, and React Testing Library. The installation process is straightforward, and there is a detailed explanation provided for each step. Overall, this starter project provides a solid foundation for building React applications quickly and efficiently.