Styling

CSS Modules

Locally scoped class mapping for a stylesheet. Use the generated mapping in className; CSS selectors still obey normal cascade rules. Source: https://nextjs.org/learn/dashboard-app/css-styling. Staged reference; snippets are illustrative and not complete apps.

Formal Syntax & Structure

nextjs syntaxnextjs
import styles from "./card.module.css"

Working Example

Example Snippetnextjs
<article className={styles.card}>Book</article>
Next.js Reference