Why styled-components and emotion struggle
Both inject styles at runtime via JavaScript. Server Components ship zero JS to the client; runtime CSS-in-JS therefore can't work in a Server Component. The directive boundary becomes a hard wall.
| Approach | Server Components | Client Components |
|---|---|---|
| CSS Modules | ✅ | ✅ |
| Tailwind CSS | ✅ | ✅ |
| styled-components | ❌ | ✅ (with registry) |
| emotion | ❌ | ✅ (with registry) |
The registry pattern
If you must keep CSS-in-JS, wrap your app in a Client "style registry" that collects styles during server rendering and flushes them into the response. Performance is a tax you pay forever.
The clean answer
For new projects, use Tailwind or CSS Modules. They run everywhere and cost nothing at runtime.