Lucide Provider

Pins lucide-react icons to nx-ui's line weight so they sit correctly beside @untitledui/icons. Compare the two sets →

$bunx shadcn@latest add @nx-ui/lucide-provider
Registry item

What the provider pins

The same lucide icon under three providers, each beside the equivalent @untitledui/icons glyph at its default weight. The middle column is the pinned value — the other two show what desynchronisation would look like in each direction.

strokeWidth 1.5
lucide reads thinner than untitledui
pinned — strokeWidth 2
matches; this is nx-ui's weight
strokeWidth 3
lucide reads heavier than untitledui

Per-icon overrides still win

The provider sets a default, not a ceiling. lucide resolves strokeWidth ?? contextStrokeWidth, so an explicit prop always beats the provider — and because the provider sets an SVG presentation attribute, Tailwind stroke-[…] utilities still win too.

useLucideContext() → strokeWidth 1.5
inherits 1.5
strokeWidth={3} wins
stroke-[2.5px] wins

Composed in real components

lucide icons passed into ordinary nx-ui components. The MetricCard is the regression demo: its icon prop reaches FeaturedIcon, which used to crash on any lucide icon because forwardRef components are objects, not functions.

Active

Emails delivered

12,480

API reference

Exported parts and their props, extracted from the component source.

…extends React.ComponentProps<typeof LucideProviderPrimitive>