|
| 1 | +# Next.js + Tailwind CSS Example |
| 2 | + |
| 3 | +This example shows how to use [Tailwind CSS](https://tailwindcss.com/) [(v2.2)](https://blog.tailwindcss.com/tailwindcss-2-2) with Next.js. It follows the steps outlined in the official [Tailwind docs](https://tailwindcss.com/docs/guides/nextjs). |
| 4 | + |
| 5 | +It uses the new [`Just-in-Time Mode`](https://tailwindcss.com/docs/just-in-time-mode) for Tailwind CSS. |
| 6 | + |
| 7 | +## Preview |
| 8 | + |
| 9 | +Preview the example live on [StackBlitz](http://stackblitz.com/): |
| 10 | + |
| 11 | +[](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-tailwindcss) |
| 12 | + |
| 13 | +## Deploy your own |
| 14 | + |
| 15 | +Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): |
| 16 | + |
| 17 | +[](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-tailwindcss&project-name=with-tailwindcss&repository-name=with-tailwindcss) |
| 18 | + |
| 19 | +## How to use |
| 20 | + |
| 21 | +Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: |
| 22 | + |
| 23 | +```bash |
| 24 | +npx create-next-app --example with-tailwindcss with-tailwindcss-app |
| 25 | +# or |
| 26 | +yarn create next-app --example with-tailwindcss with-tailwindcss-app |
| 27 | +``` |
| 28 | + |
| 29 | +Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). |
0 commit comments