CSS Modules logo

CSS Modules

A CSS file in which all class names and animation names are scoped locally by default
+ 1

What is CSS Modules?

It is a CSS file in which all class names and animation names are scoped locally by default. The key words here are scoped locally. With this, your CSS class names become similar to local variables in JavaScript. It goes into the compiler, and CSS comes out the other side.
CSS Modules is a tool in the CSS Pre-processors / Extensions category of a tech stack.

Who uses CSS Modules?

28 companies reportedly use CSS Modules in their tech stacks, including Discord, Avito, and commercetools.

64 developers on StackShare have stated that they use CSS Modules.
Pros of CSS Modules
Static rather than compiled at runtime

CSS Modules Alternatives & Comparisons

What are some alternatives to CSS Modules?
Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.
Radium is a set of tools to manage inline styles on React elements. It gives you powerful styling capabilities without CSS.
This methodology was developed at Yandex with the goals in mind that Fast development and long-lasting results for standard projects,A project involves many people,Scalable teams,Code reuse.
CSS Blocks
By combining an opinionated authoring system, build-time analysis and rewriting of templates, and a new type of CSS optimizer, css-blocks breathes new power and ease of use into the technologies and best practices that stylesheet developers already know and love.
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅
See all alternatives

CSS Modules's Followers
120 developers follow CSS Modules to keep up with related blogs and decisions.