AI Workshop: learn to build apps with AI →
Styling: Using SASS in React

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


When you build a React application using create-react-app, you have many options at your disposal when it comes to styling.

Of course, if not using create-react-app, you have all the choices in the world, but we limit the discussion to the create-react-app-provided options.

You can style using plain classes and CSS files, using the style attribute or CSS Modules, to start with.

SASS/SCSS is a very popular option, one much loved by many developers.

You can use it without any configuration at all, starting with create-react-app 2.

All you need is a .sass or .scss file, and you just import it in a component:

import './styles.scss'

You can see an example of it working at https://codesandbox.io/s/18qq31rp3.

Lessons in this unit:

0: Introduction
1: Installing Tailwind CSS in a React app
2: CSS in React
3: ▶︎ Using SASS in React
4: Styled Components