Skip to main content

Icon

<sj-icon> renders theme-aware SVG icons. Size is controlled by the host via size (px/rem). Colors accept palette tokens or raw CSS.

Props

PropTypeOptionsDefault
namestring(see all icons below)-
sizestring │ number-'1rem'
fillstring-undefined
strokestring-undefined
fillOpacitynumber0-1undefined
strokeOpacitynumber0-1undefined
sjSjStyle │ SjStyle[]-undefined

Examples

All Icons

<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem;">
<div *ngFor="let n of iconNames" style="display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5rem; background-color: lightgray; border-radius: 0.5rem;">
<sj-icon [name]="n" size="2rem"></sj-icon>
<code style="font-size: 0.8rem; color: dimgray;">{{ n }}</code>
</div>
</div>

Accessibility

<div style="display: flex; flex-direction: column; gap: 1rem;">
<div>
<p>This icon is decorative and is hidden from screen readers:</p>
<sj-icon name="sun"></sj-icon>
</div>
<div>
<p>This icon has a label and is announced by screen readers:</p>
<sj-icon name="moon" label="Moon icon"></sj-icon>
</div>
</div>

Live Example

If the embed doesn’t load, open it directly: Open on StackBlitz.