Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
how do you access bem style selectors dynamically using css modules?

for example I have a following selector in App.module.css file:

.Column--active

and I would like to access this selector from App.js file in React using css modules. First I import all selectors from css file as import styles from './App.module.css', however when I try to apply styles on a given div as following <div className={styles.Column--active}> I get an error at the very spot where I use hyphens -- between Column and Active. I tried wrapping styles.Column--active with backticks and it didn't work. Can someone please help to understand it?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

A possible solution would be:

<div className={styles['Column--active']}>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!