Back to Next Js

Basic CSS example

examples/basic-css/README.md

16.2.51.2 KB
Original Source

Basic CSS example

Next.js has built-in support for CSS Modules allowing you to write scoped CSS by automatically creating a unique class name. CSS Module files can be imported anywhere in your application and you don't have to worry about collisions.

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 basic-css basic-css-app
bash
yarn create next-app --example basic-css basic-css-app
bash
pnpm create next-app --example basic-css basic-css-app

Deploy it to the cloud with Vercel (Documentation).