Next.js · Junior · Question 49 of 75

Can you use CSS Modules in Next.js without extra configuration?

Explanation

import styles from './Button.module.css' and className={styles.primary} - class names become locally scoped. Sass (after installing the sass package), Tailwind and global CSS are supported too.

Further reading

Problem with a question

Next.js · Junior · question 49

Test yourself

Take the Next.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz