Icon
Usage
Icon renders an SVG glyph from the Meteor icon kit for compact visual cues that support a label, action, or state. Use it when an icon should be rendered consistently through the component library, with color and sizing following design tokens instead of ad-hoc inline SVG usage.
To browse the full icon set, search by name, and review icon philosophy and common usage patterns, see the Icons reference.
import { MtIcon } from "@shopware-ag/meteor-component-library";
Examples
Mode
Sizes
Colors
API reference
Props
| Prop | Type | Default |
|---|---|---|
name * | string | |
color | string | undefined |
decorative | boolean | false |
size | string | undefined |
mode | "regular" | "solid" | "regular" |
Behavior
namecan include the icon mode directly, such asregular-productsorsolid-pencil-s.modeis available when the name itself does not already include theregular-orsolid-prefix, for examplename="calendar" mode="solid".- Prefer the explicit
modeprop in docs and app code when it makes the chosen variant easier to read at a glance. solidicons usually work better for very small sizes and for larger decorative icon use, whileregularicons are often a better default for standard interface actions and supporting UI.sizeaccepts pixel strings and plain numeric values, which are normalized to pixel sizes.- Icons inherit
currentColor, so using icon color tokens keeps them aligned with the theme and state tokens used elsewhere in the library.
Accessibility
- Use
decorativefor icons that are purely visual and already explained by surrounding text. - If an icon communicates meaning on its own, make sure that meaning is still available through visible text or accessible labeling on the parent control.
- Do not depend on icon color alone to convey success, warning, or error states.
Related
- Icons: browse the full icon set, search by name, and review icon philosophy and common usage patterns.