React › Styling in React (CSS Modules, Styled Components & Tailwind)

What is a general guideline for choosing between plain CSS, CSS Modules, styled components, and Tailwind for a new project?

Beginner

Answer

Plain CSS or CSS Modules work well for teams that already know CSS well and prefer keeping styles in separate files. Styled components fit teams that want styles and component logic living together in the same file. Tailwind suits teams that want to build and adjust designs quickly, directly inside their JSX, without switching between files. There is no single correct choice, since it depends heavily on team preference and project needs.
// The same button, expressed in three different popular approaches
// CSS Module: <button className={styles.button}>
// Styled components: <StyledButton>
// Tailwind: <button className="bg-blue-500 text-white px-4 py-2 rounded">
Real-world example A new startup building their first product quickly settles on Tailwind for fast, iterative design changes, while an established enterprise team with strong existing CSS conventions sticks with CSS Modules for their new features.

Common follow-ups: Can different styling approaches be mixed together within the same project?;What factors besides personal preference should influence this decision for a real team?