Feature
Sizing
One input for square icons, two for everything else. Dimensions are applied before the file arrives, so nothing shifts.
<fast-svg name="play" size="16" />
<fast-svg name="play" size="24" />
<fast-svg name="play" size="48" />
<!-- non-square: width and height -->
<fast-svg name="logo" width="52" height="71" />
<!-- no input: uses defaultSize -->
<fast-svg name="search" />Rules
width = width || sizeheight = height || width || sizesizefalls back to thedefaultSizeoption, so an icon always has dimensions.
The values are written as attributes on the rendered <svg>. Pair them with a viewBox in the file so the drawing scales to the box.
provideFastSVG({
url: (name) => `assets/svg-icons/${name}.svg`,
defaultSize: '32', // used when a component sets no size
});