If using create-react-app then:

1)First install sass dependency using npm:

npm install sass --save-dev

2)Import your sass file to your componentName.js file

import '../scss/FileName.scss';

Answer from restricted-beam on Stack Overflow
๐ŸŒ
Create React App
create-react-app.dev โ€บ docs โ€บ adding-a-sass-stylesheet
Adding a Sass Stylesheet | Create React App
@use 'styles/_colors.scss'; // assuming a styles directory under src/ @use '~nprogress/nprogress'; // loading a css file from the nprogress node module Copy
๐ŸŒ
Bitstack
blog.bitsrc.io โ€บ how-to-use-sass-and-css-modules-with-create-react-app-83fa8b805e5e
How to Use SASS and CSS Modules with create-react-app | by Esau Silva | Bits and Pieces
March 4, 2025 - Once that is done, open ./src/App.js and in line 3 you will find import './App.css'. Change it to import './App.scss' ... You will see the default template created by create-react-app looking good!
๐ŸŒ
W3Schools
w3schools.com โ€บ react โ€บ react_sass_styling.asp
React Sass Styling
In the newly created .scss file, ... ... import { createRoot } from 'react-dom/client'; import './MyStyle.scss'; function MyHeader() { return ( <h1>My Header</h1> ); } createRoot(document.getElementById('root')).render( <MyHeader /> );...
๐ŸŒ
GitHub
github.com โ€บ the-road-to-learn-react โ€บ create-react-app-with-sass
GitHub - the-road-to-learn-react/create-react-app-with-sass: Showcasing on how to use SASS in create-react-app
TLDR: It can be used by installing node-sass on the command line with npm install node-sass --save and then by using the .scss extension instead of the .css extension for your CSS files.
Starred by 10 users
Forked by 7 users
Languages ย  JavaScript 73.3% | HTML 19.2% | CSS 7.5% | JavaScript 73.3% | HTML 19.2% | CSS 7.5%
๐ŸŒ
Robin Wieruch
robinwieruch.de โ€บ create-react-app-with-sass-support
How to use SASS in create-react-app?
October 3, 2018 - A short guide on how to add Sass support to your create-react-app application which shows you how to setup Sass, but also how to use it in your React components ...
Find elsewhere
๐ŸŒ
Medium
medium.com โ€บ @oreofeolurin โ€บ configuring-scss-with-react-create-react-app-1f563f862724
How to Configure React with SASS/SCSS (create-react-app) | by Olurin Oreofe | Medium
November 5, 2018 - How to Configure React with SASS/SCSS (create-react-app) NOTE: For latest version of create-react-app (since react-scripts@2.0.0) all you need to do is install node-sass and import a file with the โ€ฆ
๐ŸŒ
GitHub
github.com โ€บ rickharrison โ€บ create-react-app-sass
GitHub - rickharrison/create-react-app-sass: Add sass support to create-react-app.
Enhances create-react-app to include support for Sass. ... "scripts": { "start": "react-scripts-with-sass start", "build": "react-scripts-with-sass build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" }, Your src directory will automatically re-compile any .scss file into a .css file with the same name in the same location.
Starred by 41 users
Forked by 5 users
๐ŸŒ
Jointjs
resources.jointjs.com โ€บ tutorials โ€บ joint โ€บ tutorials โ€บ ReactTs.html
JointJS+ - React example app with TypeScript and SCSS using create-react-app
npx create-react-app react-rappid --template typescript ยท After a couple of seconds, a new React project should be created. In this tutorial, we will be adding SCSS support, but this next step is entirely optional, and not required for the application to function successfully.
๐ŸŒ
HackerNoon
hackernoon.com โ€บ how-to-use-sass-in-your-create-react-app-oh2x3ywb
How To Use SASS In Your Create-React-App | HackerNoon
April 21, 2020 - Create-react-app is facebook's attempt at setting up a developer to get started building react apps very quickly. It is a boilerplate that comes pre-configured with a wide array of tools and technologies that ensure a smooth running react ...
๐ŸŒ
DEV Community
dev.to โ€บ ijash โ€บ adding-sass-to-create-react-app-433i
Adding SASS to create-react-app - DEV Community
June 6, 2021 - as per this post date, I use react version ^17.0.2. In new project, install sass. ... Rename App.css to App.scss.
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ create-react-app-sass
create-react-app-sass - npm
November 11, 2016 - Latest version: 1.1.0, last published: 9 years ago. Start using create-react-app-sass in your project by running `npm i create-react-app-sass`. There are no other projects in the npm registry using create-react-app-sass.
      ยป npm install create-react-app-sass
    
Published ย  Oct 11, 2016
Version ย  1.1.0
Author ย  Rick Harrison
๐ŸŒ
Upmostly
upmostly.com โ€บ home โ€บ tutorials โ€บ create react app with sass
How to Setup Create React App with Sass (Code Examples)
November 5, 2022 - To get started, open a terminal window at the root of your create react app project and install the node-sass library. Weโ€™ll install and save node-sass in our development dependencies because Sass is a development tool.
๐ŸŒ
Medium
connorelsea.medium.com โ€บ using-sass-with-create-react-app-7125d6913760
Adding Sass or Scss to Create-React-App | by Connor Elsea | Medium
May 16, 2023 - Create react app uses multiple ... of assets. To add Sass or Scss to this project, you will be adding a loader that can process Sass and Scss files....
๐ŸŒ
Create React App
create-react-app.dev โ€บ docs โ€บ adding-a-css-modules-stylesheet
Adding a CSS Modules Stylesheet | Create React App
January 4, 2019 - Tip: Should you want to preprocess a stylesheet with Sass then make sure to follow the installation instructions and then change the stylesheet file extension as follows: [name].module.scss or [name].module.sass. CSS Modules let you use the same CSS class name in different files without worrying about naming clashes. Learn more about CSS Modules here. ... import React, { Component } from 'react'; import styles from './Button.module.css'; // Import css modules stylesheet as styles import './another-stylesheet.css'; // Import regular stylesheet class Button extends Component { render() { // reference as a js object return <button className={styles.error}>Error Button</button>; } } Copy
๐ŸŒ
GitHub
github.com โ€บ philosophie โ€บ react-sass-styleguide
GitHub - philosophie/react-sass-styleguide: Example Create React app using Sass and Bootstrap
We've picked Bootstrap for this project, and since we're using React, we'll bring in React Bootstrap. ... Note: If you need to 'customize' the default Bootstrap theme, create a _custom.scss file inside the styles/settings folder.
Starred by 9 users
Forked by 2 users
Languages ย  JavaScript 63.8% | CSS 26.0% | HTML 10.2% | JavaScript 63.8% | CSS 26.0% | HTML 10.2%
๐ŸŒ
MakeUseOf
makeuseof.com โ€บ home โ€บ programming โ€บ how to use sass in react
How to Use Sass in React
July 1, 2023 - Check out our guide on how to use CSS variables for more details. First, create a new Styles folder in your src folder. In the Styles folder, create two files: _variables.scss and _mixins.scss.
๐ŸŒ
Medium
medium.com โ€บ front-end-weekly โ€บ how-to-add-sass-or-scss-to-create-react-app-c303dae4b5bc
How to add SASS/SCSS to a create-react-app Project | by Jeff Butsch | Frontend Weekly | Medium
February 21, 2019 - (Note: The latest version of create-react-app has SASS support built in and this guide is not necessary.) This explains how to add the SASS/SCSS precompiler to an existing create-react-app project.