This example shows how to use Tailwind CSS (v3.2) with Next.js. It follows the steps outlined in the official Tailwind docs.
Deploy the example using Vercel or preview live with StackBlitz
Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example with-tailwindcss with-tailwindcss-appyarn create next-app --example with-tailwindcss with-tailwindcss-apppnpm create next-app --example with-tailwindcss with-tailwindcss-appDeploy it to the cloud with Vercel (Documentation).
First you will need to generate a github personal authentication token in order make the API CALLS. You will need to generate a classic token because Fine Grained tokens are not yet supported by graphql.
Create a .env.local file with:
NEXT_PUBLIC_GITHUB_TOKEN=your_github_access_token