tw-classed vs css-in-js #118
-
Appreciating both tailwind and css-in-js, I very much like tw-classed. Thank you. From various articles (for example, here and here, the future of css-in-js for react may not shine as bright as it once did. Does tw-classes apply the same run-time rendering for styles as css-in-js does or does tw-classed produce static css via tailwind? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
TW Classed is nothing more than a class name toggler. All CSS generation is handled via Tailwind as usual. This opens up a lot of doors in terms of both performance and usage, for example, I use TW Classed is also universal, it can be used to toggle CSS modules, regular class names, tailwind and UnoCSS. See https://tw-classed.vercel.app/docs/benchmark for comparison to Stitches (the fastest css-in-js library) |
Beta Was this translation helpful? Give feedback.
TW Classed is nothing more than a class name toggler. All CSS generation is handled via Tailwind as usual. This opens up a lot of doors in terms of both performance and usage, for example, I use
tw-classed
in React Native to toggle Nativewind classes.TW Classed is also universal, it can be used to toggle CSS modules, regular class names, tailwind and UnoCSS.
See https://tw-classed.vercel.app/docs/benchmark for comparison to Stitches (the fastest css-in-js library)