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: docs/guide/packages/lucide-preact.md
+20
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,26 @@ const App = () => {
67
67
68
68
> SVG attributes in Preact aren't transformed, so if you want to change for example the `stroke-linejoin` you need to pass it in kebabcase. Basically how the SVG spec want you to write it. See this topic in the [Preact documentation](https://preactjs.com/guide/v10/differences-to-react/#svg-inside-jsx).
69
69
70
+
## With Lucide lab or custom icons
71
+
72
+
[Lucide lab](https://github.com/lucide-icons/lucide-lab) is a collection of icons that are not part of the Lucide main library.
73
+
74
+
They can be used by using the `Icon` component.
75
+
All props like regular lucide icons can be passed to adjust the icon appearance.
76
+
77
+
### Using the `Icon` component
78
+
79
+
This creates a single icon based on the iconNode passed and renders a Lucide icon component.
80
+
81
+
```jsx
82
+
import { Icon } from'lucide-preact';
83
+
import { burger } from'@lucide/lab';
84
+
85
+
constApp= () => (
86
+
<Icon iconNode={burger} />
87
+
);
88
+
```
89
+
70
90
## One generic icon component
71
91
72
92
It is possible to create one generic icon component to load icons, but it is not recommended.
Copy file name to clipboardExpand all lines: docs/guide/packages/lucide-svelte.md
+21
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,27 @@ The package includes type definitions for all icons. This is useful if you want
166
166
167
167
For more details about typing the `svelte:component` directive, see the [Svelte documentation](https://svelte.dev/docs/typescript#types-componenttype).
168
168
169
+
## With Lucide lab or custom icons
170
+
171
+
[Lucide lab](https://github.com/lucide-icons/lucide-lab) is a collection of icons that are not part of the Lucide main library.
172
+
173
+
They can be used by using the `Icon` component.
174
+
All props like the regular Lucide icons can be passed to adjust the icon appearance.
175
+
176
+
### Using the `Icon` component
177
+
178
+
This creates a single icon based on the iconNode passed and renders a Lucide icon component.
179
+
180
+
```svelte
181
+
<script>
182
+
import { Icon } from 'lucide-svelte';
183
+
import { burger, sausage } from '@lucide/lab';
184
+
</script>
185
+
186
+
<Icon iconNode={burger} />
187
+
<Icon iconNode={sausage} color="red"/>
188
+
```
189
+
169
190
## One generic icon component
170
191
171
192
It is possible to create one generic icon component to load icons, but it is not recommended.
0 commit comments