Linaria is a zero-runtime CSS-in-JS library that extracts CSS to plain files at build time using a Babel preset. Unlike traditional CSS-in-JS libraries (styled-components, Emotion), it has no runtime cost — no CSS parser is bundled with JavaScript, enabling parallel downloading of CSS and JS. It supports tagged template literal syntax, build-time JavaScript expressions, Sass-like nesting, SSR critical CSS extraction, and Webpack hot reload. The key trade-off is that dynamic values like props cannot be used since all CSS must be evaluable at build time.
Table of contents
How does it differ from CSS modules?How does it differ from other CSS in JS libraries?Sort: