Skip to main content

CSS & Sass Support

You can import .css and .scss files into your JavaScript/TypeScript files to include them in your bundle:

import "./my-styles.scss"

CSS Modules#

Any file ending with .module.css or .module.scss will be treated as a CSS module. You can import the class names from the module like so:

import styles from "./styles.css"
export function MyComponent() {    return <div className={styles.box}>I am styled with CSS modules!</div>}
Learn More

For more information on CSS Modules check out this article.