Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brob/next-js-e-commerce-juice
https://github.com/brob/next-js-e-commerce-juice
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/brob/next-js-e-commerce-juice
- Owner: brob
- Created: 2020-10-26T21:15:30.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:23:04.000Z (about 1 year ago)
- Last Synced: 2024-11-07T00:29:54.259Z (about 2 months ago)
- Language: CSS
- Homepage: nextjs-juice-commerce.vercel.app
- Size: 3.51 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tailwind CSS example
This is an example of using [Tailwind CSS](https://tailwindcss.com) in a Next.js project.
## Deploy your own
Deploy the example using [Vercel](https://vercel.com):
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/with-tailwindcss)
## How to use
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:
```bash
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](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
## Notes
This example is a basic starting point for using [Tailwind CSS](https://tailwindcss.com) with Next.js. It includes the following [PostCSS](https://github.com/postcss/postcss) plugins:
- [postcss-preset-env](https://preset-env.cssdb.org/) - Adds stage 2+ features and autoprefixes
To control the generated stylesheet's filesize, this example uses Tailwind CSS' [`purge` option](https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css) to remove unused CSS.