styled-jsx

Project link ↗

I co-authored and maintained styled-jsx, an open source library for writing scoped CSS alongside JSX components. It comes with Next.js and can also be used independently.

CSS selectors normally apply across a page, so one component's styles can affect another. Styled-jsx lets developers keep familiar CSS syntax inside a component while the library handles scoping. It supports dynamic and global styles, preprocessing plugins and server rendering.

The work brought together compiler and runtime design to give React developers a practical interface for component styles.

Hiring or want to work together?

←