This example is a basic starting point for using Tailwind CSS with Next.js.
Deploy the example using Vercel:
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).
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.