Navigation

v1.0.0
Design

Stroke width

Adjust line weight while keeping cutouts and spacing.

On this page

#Set a width

Every icon accepts strokeWidth, in the dynamic and fixed entries of each framework package and in the JavaScript renderer.

import { SearchIcon } from '@master/icons-react/24/soft';<SearchIcon strokeWidth={2} />
import { Search, renderSvg } from '@master/icons';const svg = renderSvg(Search, { size: 20, strokeWidth: 1.75 });

Omit it to keep the drawing's native width. In the collection, the stroke slider previews a width on every icon, and the copied code and downloads include it.

#Ranges

Widths are in the native units of the optical master's viewBox, in steps of 0.25. Each master supports its own range:

Optical sizeNative widthRange
16 px1.250.75–1.5
20 px1.51–2
24 px1.751.25–2.5

Values outside the selected master's range are clamped to it. Nonpositive and nonfinite values, and values that are not a multiple of 0.25, throw an error.

#Redrawn geometry

Changing the SVG stroke-width attribute only thickens lines in place, which closes gaps, cutouts and the space between details. Each supported width is drawn ahead of time instead: cutouts, masks and clearances are recomputed for it, so a heavier icon keeps its spacing. Never override stroke-width with CSS.

Display size scales the whole drawing, including its stroke. Brand marks keep their original shape and ignore the width; their outline versions, such as brand-github-outline, accept it.

#Download sets

Each optical size has one ZIP archive of every supported width in every corner style, such as master-icons-24-strokes.zip with folders like soft/stroke-2/. Its files carry the same license notices as the native sets. See download.