rsnext/examples/with-tailwindcss
Steven 9f9214abe5
Updated create-next-app docs to include pnpm usage (#35755)
This PR updates the docs and examples for `create-next-app` to include pnpm usage.

The following script was used to update every example README:

```js
const fs = require('fs')
const examples = fs.readdirSync('./examples')

for (let example of examples) {
    const filename = `./examples/${example}/README.md`
    const markdown = fs.readFileSync(filename, 'utf8')
    const regex = new RegExp(`^yarn create next-app --example (.*)$`, 'gm')
    const output = markdown.replace(regex, (yarn, group) => {
        const pnpm = `pnpm create next-app -- --example ${group}`
        return `${yarn}\n# or\n${pnpm}`
    })
    fs.writeFileSync(filename, output)
}
```
2022-03-30 21:03:21 +00:00
..
pages Updated head, img -> Image, type { NextPage } as default next-app (#34513) 2022-02-18 21:15:25 +00:00
public Bring Tailwind CSS example in line with official Tailwind docs (#19750) 2021-01-25 14:20:14 +01:00
styles Update example for Tailwind v3 (#32339) 2021-12-09 22:42:42 +00:00
.gitignore converted the old tailwind css example to typescript (#32808) 2022-01-05 17:41:25 +00:00
next-env.d.ts converted the old tailwind css example to typescript (#32808) 2022-01-05 17:41:25 +00:00
next.config.js converted the old tailwind css example to typescript (#32808) 2022-01-05 17:41:25 +00:00
package.json [examples] Add new Tailwind CSS Prettier plugin to example (#33614) 2022-01-24 21:24:48 +00:00
postcss.config.js converted the old tailwind css example to typescript (#32808) 2022-01-05 17:41:25 +00:00
prettier.config.js removing redundant/unnecessary lines as these are defaults (#34587) 2022-02-21 00:24:38 +00:00
README.md Updated create-next-app docs to include pnpm usage (#35755) 2022-03-30 21:03:21 +00:00
tailwind.config.js Update example for Tailwind v3 (#32339) 2021-12-09 22:42:42 +00:00
tsconfig.json converted the old tailwind css example to typescript (#32808) 2022-01-05 17:41:25 +00:00

Next.js + Tailwind CSS Example

This example shows how to use Tailwind CSS (v3.0) with Next.js. It follows the steps outlined in the official Tailwind docs.

Deploy your own

Deploy the example using Vercel or preview live with StackBlitz

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
# or
pnpm create next-app -- --example with-tailwindcss with-tailwindcss-app

Deploy it to the cloud with Vercel (Documentation).