To get started with Tailwind in React:
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
Edit tailwind.config.js
to include:
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
Edit index.css
to include:
@tailwind base;
@tailwind components;
@tailwind utilities;
If you are using Visual Studio Code, install the Tailwind CSS IntelliSense extension.
- Tailwind UI has free example components
- daisy UI is a plugin for Tailwind that simplifies development
- Refactoring UI is a design book by the Tailwind creators that provides design advice
- Headless UI provides unstyled React components
- More resources
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best
performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.