Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zero][docs] Add a Why section on the README #41284

Merged
merged 13 commits into from
Mar 4, 2024
10 changes: 10 additions & 0 deletions packages/pigment-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
A zero-runtime CSS-in-JS library that extracts the colocated styles to their own CSS files at build-time.

- [Getting started](#getting-started)
- [Why this project exists?](#why-choose-pigment-css)
- [Next.js](#nextjs)
- [Vite](#vite)
- [Basic usage](#basic-usage)
Expand All @@ -23,6 +24,15 @@ A zero-runtime CSS-in-JS library that extracts the colocated styles to their own

Pigment CSS supports Next.js and Vite with support for more bundlers in future. You must install the corresponding plugin, as shown below.

### Why choose Pigment CSS

Thanks to recent advancements in CSS (like CSS variables and `color-mix()`), "traditional" CSS-in-JS solutions that process styles at runtime are no longer required for unlocking features like color transformations and theme variables which are necessary for maintaining a sophisticated design system.

Pigment CSS addresses the needs of the modern React developer by providing a zero-runtime CSS-in-JS styling solution as a successor to tools like Emotion and styled-components.

Compared to its predecessors, it offers improved DX and runtime performance (though at the cost of increased build time) while also being compatible with React Server Components.
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
Pigment CSS is built on top of [WyW-in-JS](https://wyw-in-js.dev/), enabling us to provide the smoothest possible experience for Material UI users when migrating from Emotion in v5 to Pigment in v6.

### Next.js

```bash
Expand Down
Loading