SmartIcon
VERSION2.3.0
LICENSEMIT
CONFIG6 Options
Advanced state machine that morphs SVGs based on semantic context.
Installation
pnpm add @supermousejs/labsUsage
import { SmartIcon } from '@supermousejs/labs';
app.use(SmartIcon({ icons: { ... } }));Configuration
* Reactive Property| Option | Type | Default | Description |
|---|---|---|---|
| icons | Record<string, string> | {} | Map of state names to SVG strings. |
| size * | number | 24 | Size of the icon container. |
| color * | string | 'black' | Icon fill color (currentColor). |
| anchor * | string | 'center' | Alignment (center, top-left, etc). |
| offset | [number, number] | [0, 0] | Fixed offset. |
| transitionDuration | number | 200 | Morph transition time in ms. |