Icon
Provide consistent sizing and interaction for SVG or image icons.
Usage guide
#Support meaning or represent actions. Provide an accessible name for icon-only actions.
Provide SVG directly
Pass the icon through the SVG slot or svgMarkup.
Provide a file
Set path to a file URL accessible to the browser.
Examples
#Feature examples
#Choose a feature from 6 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.
No matching features.
API reference
#Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.
<sy-icon>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | 'medium' | Component size. | |
string | undefined | Icon SVG or image URL. | |
string | undefined | SVG markup string to display. | |
boolean | false | Preserve the original SVG aspect ratio. | |
boolean | false | Allow selection events and keyboard interaction. |
Events
| Event | Detail | Description |
|---|---|---|
CustomEvent<{ value: string }> | Emitted when the user selects an item. |
Slots
| Slot | Description |
|---|---|
| Component body or child items. |