SvgIcon
stableA wrapper for custom SVG icons.
Basic usage
Examples
Accessible icon
Provide a title when the icon communicates meaning.
Decorative icon
Leave title empty when nearby text already names the action.
Size and color
Use titleAccess for MUI-style accessible titles.
Features
- Accessible title support.
- Current-color sizing.
Installation
bash
pnpm dlx structyl add svg-iconAPI Reference
SvgIcon
Current-color SVG wrapper.
| Prop | Type | Default |
|---|---|---|
| title | stringAccessible SVG title. | — |
| titleAccess | stringMUI-style alias for title. | — |
| fontSize | 'inherit' | 'small' | 'medium' | 'large'Icon size. | 'medium' |
| color | 'default' | 'inherit' | 'primary' | 'secondary' | 'success' | 'warning' | 'destructive' | 'muted'Tokenized icon color. | 'inherit' |
| className | stringAdditional Tailwind classes merged with the component defaults. | — |