sw-ui-icon

View as MarkdownOpen in Claude

Inline SVG icon component backed by a curated icon set.

1<sw-ui-icon name="microphone"></sw-ui-icon>

Picks an SVG out of the bundled ICONS map (raw import of .svg files in this folder) by name and renders it inline so it inherits color from its host — use currentColor in your stylesheets to tint the icon. Width and height are written into the SVG markup at render time using the size property so layout doesn’t depend on extra CSS.

The full set of available names is exported as the IconName type. Unknown names render nothing rather than throwing.

Class: SwUiIcon · Module: packages/web-components/src/components/UI/icons/sw-ui-icon.ts

class: SwUiIcon, sw-ui-icon

Fields

name
IconNameDefaults to 'close'

name field.

size
numberDefaults to 24

size field.

Attributes

NameFieldInherited From
namename
sizesize