Loading

Quipoin Menu

Learn • Practice • Grow

react / CSS Modules in React
mcq
Direction: Choose the correct option

Q1.

What are CSS Modules in React?
A. A CSS framework
B. A method to inline CSS
C. A styling library
D. A way to write CSS that is locally scoped to a component by default
Direction: Choose the correct option

Q2.

How do you import a CSS Module in a React component?
A. require('./Component.css');
B. import styles from './Component.module.css';
C. import './Component.css';
D. import { styles } from './Component.css';
Direction: Choose the correct option

Q3.

How do you apply a class from a CSS Module?
A. Both A and C
B. className={styles['className']}
C. className={styles.className}
D. className='styles.className'
Direction: Choose the correct option

Q4.

What naming convention is often used for CSS Module files?
A. [name].local.css
B. [name].css
C. [name].scoped.css
D. [name].module.css
Direction: Choose the correct option

Q5.

What advantage do CSS Modules provide?
A. Global scope by default
B. Automatic vendor prefixing
C. Built-in theming
D. Local scope, avoiding class name collisions