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: README.md
+58-54
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Palettez
2
2
3
-
A flexible and powerful theme management library for JavaScript applications.
3
+
A flexible and powerful theme management library for JavaScript applications
4
4
5
5
## Features
6
6
@@ -33,7 +33,7 @@ pnpm add palettez
33
33
34
34
## Basic Usage
35
35
36
-
For client-side persistence (eg. localStorage), it's recommended to initialize Palettez in a synchronous script to avoid theme flicker on page load.If your project's bundler supports importing static asset as string, you can inline the minified version of Palettez to reduce the number of HTTP requests. Check out the demo for example usage with Astro and Vite.
36
+
For client-side persistence (eg. localStorage), it's recommended to initialize Palettez in a synchronous script to avoid theme flicker on page load.If your project's bundler supports importing static asset as string, you can inline the minified version of Palettez to reduce the number of HTTP requests. Check out the demo for example usage with Astro and Vite.
37
37
38
38
```html
39
39
<scriptsrc="https://unpkg.com/palettez"></script>
@@ -69,7 +69,7 @@ For client-side persistence (eg. localStorage), it's recommended to initialize P
Ensure that you have called `create` before `usePalettez`.
199
+
Ensure that you have called `create` before `usePalettez`. Since Palettez is initialized in a synchronous script, `usePalettez` should only be used in a client-only component.
196
200
197
201
```tsx
198
202
import { usePalettez } from'palettez/react'
@@ -201,33 +205,33 @@ export function ThemeSelect() {
0 commit comments