SvgIcon ​

SVG icon component that renders icons using SVG symbol references. Works with SVG sprite sheets.

Basic Usage ​

Use name prop to specify the icon name. The component constructs a symbol ID as #prefix-name, so the page must register a matching SVG sprite symbol such as #icon-home.

Custom Prefix ​

Use prefix to customize the symbol ID prefix. This example references the #my-icon-settings symbol in the docs sprite.

API ​

SvgIcon Attributes ​

NameDescriptionTypeDefault
nameicon namestring—
prefixicon prefix for symbol IDstring'icon'
icon-classicon class name (fallback to name)string—

Source ​

Docs