Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
UyLeQuoc committed Feb 18, 2023
0 parents commit 162c5fd
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Next.js + Tailwind CSS Example

This example shows how to use [Tailwind CSS](https://tailwindcss.com/) [(v3.0)](https://tailwindcss.com/blog/tailwindcss-v3) with Next.js. It follows the steps outlined in the official [Tailwind docs](https://tailwindcss.com/docs/guides/nextjs).

## How to use

Install `yarn` by running `npm i yarn`.

Run `yarn install` or `npm install` to install all the required dependencies.

Run `yarn dev` or `npm run dev` to start the development server on [localhost:3000](localhost:3000).

Run `yarn build` or `npm run build` to build the project, and `yarn start` or `npm run start` to run the project.

## Notes

This project uses the combination of [MUI](https://mui.com/) for UI components, [emotion](https://emotion.sh/docs/introduction) as the styled engine for MUI and [TailwindCSS](https://tailwindcss.com/).

The current configuration allows TailwindCSS to be injected at the bottom of the `<head></head>` tag, overwriting styles from MUI while still maintaining the effect of inline style.

> This is achieved by adding the class `'#__next'` before TailwindCSS, allowing it to take precedence over MUI.

0 comments on commit 162c5fd

Please sign in to comment.