.. | ||
components | ||
pages | ||
styles | ||
.gitignore | ||
package.json | ||
postcss.config.js | ||
README.md | ||
tailwind.config.js |
Tailwind CSS example
This example is a basic starting point for using Tailwind CSS with Next.js.
Deploy your own
Deploy the example using 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 includes the following PostCSS plugins:
- tailwindcss - utility-first CSS framework
- autoprefixer - plugin to parse CSS and add vendor prefixes to CSS rules using values from Can I Use.
To control the generated stylesheet's filesize, this example uses Tailwind CSS' purge
option to remove unused CSS.