What CSS frameworks have you used?

CSS

The short answer

The most popular CSS frameworks are Tailwind CSS (utility-first), Bootstrap (component-based), and CSS-in-JS solutions like styled-components. Each has a different approach — Tailwind gives you utility classes to compose styles, Bootstrap gives you pre-built components, and CSS-in-JS lets you write CSS directly in JavaScript.

Tailwind CSS

Utility-first — you compose styles from small, single-purpose classes:

<button
class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600"
>
Submit
</button>

Pros: Fast to build, consistent design, small production bundle (purges unused classes), no naming decisions. Cons: HTML can look cluttered, learning curve for the class names.

Bootstrap

Component-based — provides pre-built UI components:

<button class="btn btn-primary">Submit</button>
<div class="container">
<div class="row">
<div class="col-md-6">Half width</div>
<div class="col-md-6">Half width</div>
</div>
</div>

Pros: Fast prototyping, consistent look, good documentation, includes JavaScript components (modals, dropdowns). Cons: Sites can look generic, large bundle if not customized, overriding styles is hard.

CSS-in-JS (styled-components, Emotion)

Write CSS directly in your JavaScript/React components:

const Button = styled.button`
background: blue;
color: white;
padding: 8px 16px;
border-radius: 4px;
&:hover {
background: darkblue;
}
`;

Pros: Scoped styles, dynamic styles based on props, no class name conflicts. Cons: Runtime cost, larger bundle, different syntax to learn.

CSS Modules

Scoped CSS files that generate unique class names:

/* Button.module.css */
.button {
background: blue;
color: white;
}
import styles from './Button.module.css';
<button className={styles.button}>Submit</button>;

Pros: No class name conflicts, regular CSS syntax, no runtime cost. Cons: Less flexible than CSS-in-JS for dynamic styles.

Interview Tip

This is an opinion question — have a preference and explain why. "I prefer Tailwind because it is fast and keeps styles close to the markup" or "I prefer CSS Modules because it is just CSS with scoping" are both good answers. Show that you have used at least one framework and understand its tradeoffs.

Why interviewers ask this

This tests your practical experience with CSS tooling. Interviewers want to see if you have used modern CSS solutions, understand the tradeoffs between different approaches, and can make an informed choice for a project.