Back to Next Js

styled-jsx example

examples/with-styled-jsx/README.md

16.2.51.2 KB
Original Source

styled-jsx example

Next.js ships with 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

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

bash
npx create-next-app --example with-styled-jsx with-styled-jsx-app
bash
yarn create next-app --example with-styled-jsx with-styled-jsx-app
bash
pnpm create next-app --example with-styled-jsx with-styled-jsx-app

Deploy it to the cloud with Vercel (Documentation).