Real-world CSS vs. CSS-in-JS performance comparison

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. styled-components

    Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

    - Dynamic control over style. Basically your stylesheet is JS function returning style. You can do anything here. See this https://github.com/styled-components/styled-components/issue...

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. emotion

    👩‍🎤 CSS-in-JS library designed for high performance style composition

  4. classnames

    A simple javascript utility for conditionally joining classNames together

    Added one more point on API side. Also, you'll probably end up using one more library called classname for better classname management.

    https://www.npmjs.com/package/classnames

    In the end, I generally prefer to use tailwind + emotion. My goals usually is to save time and make system more consistent rather than optimizing JS bundle, etc.

  5. clsx

    A tiny (239B) utility for constructing `className` strings conditionally.

  6. twstyled

    ⚡ Blazing fast full-featured Tailwind CSS + CSS in JS Compiler

    We have a "write tachyons/tailwinds CSS-in-TypeScript" project [1] that can sit on top of any CSS-in-JS runtime (emotion and fela are both supported).

    I'm hoping to eventually find one of these build-time CSS-in-JS frameworks that is smart enough to partially eval ~80% of our `

    ` expressions to be zero runtime.

    And, if/when this happens, do this as a seamless upgrade to our existing codebases, i.e. without any lines of `css={Css.m4.black.$}` in our app need to change.

    Basically we're using our Truss DSL both for atomic/utility class names today + a decoupling layer to switch CSS-in-JS libs in the future if/when needed.

    I think Linaria and https://github.com/twstyled/twstyled (based on/forked from Linaria) are the closest to doing this eval during compilation, but haven't had to dig in so far (runtime emotion has been fast enough for us so far).

    [1]: https://github.com/homebound-team/truss/

  7. personal_web

    Source code of my personal website: https://pustelto.com

    or you can read the source markdown here:

    https://github.com/Pustelto/personal_web/blob/master/src/blo...

  8. css-modules-typescript-loader

    Webpack loader to create TypeScript declarations for CSS Modules

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. webpack-react-typescript

  11. chakra-ui

    Chakra UI is a component system for building SaaS products with speed ⚡️

    CSS-in-JS alone doesn't give you many tools for that kind of stuff, but if you use something that integrates more design system-style theming it's pretty easy - have a look at https://chakra-ui.com/ and click on the moon icon in the top corner for instant dark mode. Implementing various themes for high-contrast etc. would just be a case of changing the theme.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Why We're Breaking Up with CSS-in-JS

    6 projects | /r/javascript | 16 Oct 2022
  • Blockchain Lottery

    9 projects | /r/typescript | 21 Jul 2022
  • Goodbye CSS Modules, Hello TailwindCSS

    9 projects | news.ycombinator.com | 4 Nov 2021
  • The CSS Odyssey: Why I Turned back to CSS After Trying Everything Else

    7 projects | dev.to | 5 Jun 2025
  • 11 Interview Questions You Should Know as a React Native Developer in 2025 📈🚀

    1 project | dev.to | 13 Apr 2025

Did you know that JavaScript is
the 3rd most popular programming language
based on number of references?