You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/pigment-react/README.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ Pigment CSS is a zero-runtime CSS-in-JS library that extracts the colocated styl
4
4
5
5
-[Getting started](#getting-started)
6
6
-[Why this project exists?](#why-choose-pigment-css)
7
-
-[Next.js](#nextjs)
8
-
-[Vite](#vite)
7
+
-[Next.js](#nextjs-starter-template)
8
+
-[Vite](#vite-starter-template)
9
9
-[Basic usage](#basic-usage)
10
10
-[Creating styles](#creating-styles)
11
11
-[Creating components](#creating-components)
@@ -35,9 +35,7 @@ Pigment CSS addresses the needs of the modern React developer by providing a zer
35
35
Compared to its predecessors, Pigment CSS offers improved DX and runtime performance (though at the cost of increased build time) while also being compatible with React Server Components.
36
36
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.
37
37
38
-
### Next.js
39
-
40
-
#### Starter template
38
+
### Next.js - Starter template
41
39
42
40
Use the following commands to create a new Next.js project with Pigment CSS set up:
43
41
@@ -83,9 +81,7 @@ Finally, import the stylesheet in the root `layout.tsx` file:
83
81
}
84
82
```
85
83
86
-
### Vite
87
-
88
-
#### Starter template
84
+
### Vite - Starter template
89
85
90
86
Use the following commands to create a new Vite project with Pigment CSS set up:
91
87
@@ -134,7 +130,7 @@ Finally, import the stylesheet in the root `main.tsx` file:
134
130
135
131
## Basic usage
136
132
137
-
> You must configure Pigment CSS with [Next.js](#nextjs) or [Vite](#vite) first.
133
+
**You must configure Pigment CSS with [Next.js](#nextjs) or [Vite](#vite) first.**
Use the `keyframes` API to create reusable [animation keyframes](https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes):
372
368
373
369
```js
374
-
import { keyframes } from'@mui/zero-runtime';
370
+
import { keyframes } from'@pigment-css/react';
375
371
376
372
constfadeIn= keyframes`
377
373
from {
@@ -390,7 +386,7 @@ function Example1() {
390
386
The call to the `keyframes` function will be replaced with a unique string that represents the CSS animation name. It can be used with `css` or `styled` too.
0 commit comments