22 lines
1.1 KiB
Markdown
22 lines
1.1 KiB
Markdown
|
# styled-jsx example
|
||
|
|
||
|
Next.js ships with [styled-jsx](https://github.com/vercel/styled-jsx) allowing you to write scoped styled components with full CSS support. This is important for the modularity and code size of your bundles and also for the learning curve of the framework. If you know CSS you can write `styled-jsx` right away.
|
||
|
|
||
|
## 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-styled-jsx)
|
||
|
|
||
|
## 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-styled-jsx with-styled-jsx-app
|
||
|
# or
|
||
|
yarn create next-app --example with-styled-jsx with-styled-jsx-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)).
|