Sizing & stroke

Size

Size is a string — anything valid for an SVG width/height attribute. Default is "24".

CSS units work too:

StrokeWidth

Any double. Lucide's default is 2.

AbsoluteStroke

By default, stroke scales with size — a 48px icon has a visually thicker stroke than a 16px one at the same StrokeWidth="2". Sometimes that's not what you want; you want the rendered stroke width to look constant across sizes.

AbsoluteStroke="true" divides the stroke by size to compensate:

Default (stroke scales):

Absolute (stroke is visually constant):

The math: emitted stroke-width = StrokeWidth × 24 / Size. When Size isn't a plain number ("1.5em", "100%"), AbsoluteStroke silently falls back to StrokeWidth as-is — there's no scale to compensate for.

Sizing via CSS

Because everything ultimately becomes an SVG element, you can size icons via CSS too:

Set Size="100%" and let the parent constrain the box.