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
> **Automatically generates an SVG sprite containing only the icons you used in development** - Lucide + custom SVGs.
11
+
> **Generates one SVG sprite containing only the icons you used** - Lucide + custom SVGs.
12
+
> DX with real `<Icon/>` in dev ➡️ zero-runtime `<use/>` in prod.
9
13
10
-
> **Zero-runtime icon sprites for React.** using Lucide icons and custom SVGs - optimized for dev experience and production performance. Part of the [React Zero-UI](https://github.com/react-zero-ui) ecosystem.
14
+
> Part of the [React Zero-UI](https://github.com/react-zero-ui) ecosystem.
11
15
12
16
13
17
---
14
18
15
19
## 🧠 What This Library Does
16
20
17
-
This package gives you:
18
-
19
21
1.**Full Lucide-React DX in development**
20
-
Easy Imports, Instant updates, hot-reloading, JSX props, no caching issues. Use Just like Lucid but import the icon from `@react-zero-ui/icon-sprite` instead of `lucide-react`.
22
+
Easy imports, hot reload, JSX props — import icons from `@react-zero-ui/icon-sprite` instead of `lucide-react`.
21
23
22
-
2.**Zero-runtime SVG sprite usage in production**
23
-
Replaces every icon component with a `<use href="/icons.svg#id" />` element at build time.
24
+
2.**Zero-runtime in production**
25
+
Every icon becomes `<use href="/icons.svg#id" />` at build time.
24
26
25
-
3.**Tree-shaking via static analysis**
26
-
Icons are only included in the final sprite if your app actually uses them.
27
+
3.**Smallest possible sprite**
28
+
Only icons actually used in your app are included.
27
29
28
-
## 🙏 Custom icon support
29
-
Just drop SVGs into `app/zero-ui-icons/`, and use the `<CustomIcon/>`component. set the `name` prop to the name of the icon file want to use.
30
+
## 🙏 Custom Icon Support
31
+
Drop SVGs into **`/zero-ui-icons/`** at your project root, then use `<CustomIcon/>`with the `name` prop set to the file name (without `.svg`).
30
32
31
33
> [!TIP]
32
34
>```txt
33
-
>📁/public/zero-ui-icons/
35
+
>📁/zero-ui-icons/
34
36
> └── dog.svg
35
-
>```
36
-
>```tsx
37
+
>```
38
+
>```tsx
37
39
>import { CustomIcon } from "@react-zero-ui/icon-sprite";
38
-
>//❗The name MUST match the name of the icon file - .svg extension is not needed.
40
+
>//❗The name MUST match the name of the file name (no .svg extension).
> **Automatically generates an SVG sprite containing only the icons you used in development** - Lucide + custom SVGs.
10
+
> 
11
+
> **Generates one SVG sprite containing only the icons you used** - Lucide + custom SVGs.
12
+
> DX with real `<Icon/>` in dev ➡️ zero-runtime `<use/>` in prod.
9
13
10
-
> **Zero-runtime icon sprites for React.** using Lucide icons and custom SVGs - optimized for dev experience and production performance. Part of the [React Zero-UI](https://github.com/react-zero-ui) ecosystem.
14
+
> Part of the [React Zero-UI](https://github.com/react-zero-ui) ecosystem.
11
15
12
16
13
17
---
14
18
15
19
## 🧠 What This Library Does
16
20
17
-
This package gives you:
18
-
19
21
1.**Full Lucide-React DX in development**
20
-
Easy Imports, Instant updates, hot-reloading, JSX props, no caching issues. Use Just like Lucid but import the icon from `@react-zero-ui/icon-sprite` instead of `lucide-react`.
22
+
Easy imports, hot reload, JSX props — import icons from `@react-zero-ui/icon-sprite` instead of `lucide-react`.
21
23
22
-
2.**Zero-runtime SVG sprite usage in production**
23
-
Replaces every icon component with a `<use href="/icons.svg#id" />` element at build time.
24
+
2.**Zero-runtime in production**
25
+
Every icon becomes `<use href="/icons.svg#id" />` at build time.
24
26
25
-
3.**Tree-shaking via static analysis**
26
-
Icons are only included in the final sprite if your app actually uses them.
27
+
3.**Smallest possible sprite**
28
+
Only icons actually used in your app are included.
27
29
28
-
## 🙏 Custom icon support
29
-
Just drop SVGs into `app/zero-ui-icons/`, and use the `<CustomIcon/>`component. set the `name` prop to the name of the icon file want to use.
30
+
## 🙏 Custom Icon Support
31
+
Drop SVGs into **`/zero-ui-icons/`** at your project root, then use `<CustomIcon/>`with the `name` prop set to the file name (without `.svg`).
30
32
31
-
> [!TIP]
33
+
> 
32
34
>```txt
33
-
>📁/public/zero-ui-icons/
35
+
>📁/zero-ui-icons/
34
36
> └── dog.svg
35
-
>```
36
-
>```tsx
37
+
>```
38
+
>```tsx
37
39
>import { CustomIcon } from "@react-zero-ui/icon-sprite";
38
-
>//❗The name MUST match the name of the icon file - .svg extension is not needed.
40
+
>//❗The name MUST match the name of the file name (no .svg extension).
39
41
><CustomIcon name="dog" size={24} />
40
42
>```
41
43
42
-
<small>This command builds the icons sprite for production</small>
0 commit comments