One of the core downsides to CSS-in-JS is that you have to compile it on the client, which means increased bundle sizes and slower rendering. Linaria is an attempt to fix that, by providing all of the typical CSS-in-JS DX – nesting, props, functions, exports etc. – but then transpiling that to CSS files during the build step.
Theoretically works with every front-end framework, but there seem to be issues with Next.js, unfortunately.