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
Introducing absoluteStrokeWidth, an option to control the behavior of scaling strokeWidth in icons. A new option to control the look of Lucide icons.
By default, scaling up SVG icons will cause the strokeWidth to scale with the viewBox set on the SVG icon.
Setting absoluteStrokeWidth to true, the strokeWidth will remain the same size visually.
Visualised example
Disabled (Default, Current behavior, SVG default behavior) absoluteStrokeWidth: false
Enabled (keeping the set strokeWidth in pixels) absoluteStrokeWidth: true
The package for angular got a similar API as the other packages. This means it got the same options to customize the look of Lucide Icons as the other packages.
Fixed SSR issues
The package now supports SSR, so you can use Lucide icons in your Angular application when using SSR.
Deprecations
The exported types IconData, IconNode, and Icons have been deprecated in favor of the less generic LucideIconData, LucideIconNode, and LucideIcons. They will still work for now, but be sure to update your code, as they will be removed in v1.0.
Breaking changes
The createElement helper method has been removed since its usage broke SSR and the TrustedHTML support.
Bugs
If you experienced any bugs related to this update, please open an issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
New feature:
absoluteStrokeWidth
optionAvailable for:
lucide-react
lucide-vue
lucide-vue-next
lucide-svelte
lucide-angular
lucide-solid
lucide-react-native
lucide-preact
Introducing
absoluteStrokeWidth
, an option to control the behavior of scalingstrokeWidth
in icons. A new option to control the look of Lucide icons.By default, scaling up SVG icons will cause the
strokeWidth
to scale with theviewBox
set on the SVG icon.Setting
absoluteStrokeWidth
totrue
, thestrokeWidth
will remain the same size visually.Visualised example
Disabled (Default, Current behavior, SVG default behavior)
absoluteStrokeWidth: false
Enabled (keeping the set strokeWidth in pixels)
absoluteStrokeWidth: true
React Code Example
Update on
lucide-angular
The package for angular got a similar API as the other packages. This means it got the same options to customize the look of Lucide Icons as the other packages.
Fixed SSR issues
The package now supports SSR, so you can use Lucide icons in your Angular application when using SSR.
Deprecations
The exported types
IconData
,IconNode
, andIcons
have been deprecated in favor of the less genericLucideIconData
,LucideIconNode
, andLucideIcons
. They will still work for now, but be sure to update your code, as they will be removed in v1.0.Breaking changes
The
createElement
helper method has been removed since its usage broke SSR and the TrustedHTML support.Bugs
If you experienced any bugs related to this update, please open an issue.
This discussion was created from the release Packages Update! 📦 v0.170.0.
Beta Was this translation helpful? Give feedback.
All reactions