rsnext/examples/with-tailwindcss
Yuri Yakovlev 0c38922525
Update Tailwind example to v2.0 (#19278)
- Bump the Tailwind version to v2.0
- Add necessary latest `postcss` and `autoprefixer` deps
- Clean the tw config a bit
- Add dark mode styles
2020-11-20 18:18:49 +00:00
..
components Update Tailwind example to v2.0 (#19278) 2020-11-20 18:18:49 +00:00
pages Update Tailwind example to v2.0 (#19278) 2020-11-20 18:18:49 +00:00
styles Update Tailwind example to v2.0 (#19278) 2020-11-20 18:18:49 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Update Tailwind example to v2.0 (#19278) 2020-11-20 18:18:49 +00:00
postcss.config.js Update Tailwind example to v2.0 (#19278) 2020-11-20 18:18:49 +00:00
README.md Simplify example usage instructions (#16678) 2020-08-29 22:22:02 -04:00
tailwind.config.js Update Tailwind example to v2.0 (#19278) 2020-11-20 18:18:49 +00:00

Tailwind CSS example

This is an example of using Tailwind CSS in a Next.js project.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-tailwindcss with-tailwindcss-app
# or
yarn create next-app --example with-tailwindcss with-tailwindcss-app

Deploy it to the cloud with Vercel (Documentation).

Notes

This example is a basic starting point for using Tailwind CSS with Next.js. It includes the following PostCSS plugins:

To control the generated stylesheet's filesize, this example uses Tailwind CSS' purge option to remove unused CSS.