loading...

Good CSS-in-JS library for Preact

talentlessguy profile image v 1 r t l ・1 min read

hey, anyone knows a good CSS-in-JS library that works well with Preact?

And I need this kind of syntax:

styled.div`
  color: red
`

I tried using emotion but it has ts warnings

styled components depend on React

I know there is aliasing but I'd like to write without them :)

I don't care if the library is popular or not, there are only 3 conditions:

  • it should work with TypeScript
  • Preact support
  • The syntax I mentioned before

Discussion

pic
Editor guide
 

Zero runtime CSS in JS library Linaria is my choose.
Preact, Typescript – all work well