Theming
Style icons with CSS custom properties — globally, per-selector, or per-icon.
CSS Variables
| Variable | Description |
|---|---|
--ai-size | Width and height (default: 24px) |
--ai-color | Primary icon color (default: currentColor) |
--ai-stroke-width | Stroke thickness for stroke/duotone icons (default: 1.5) |
--ai-duration | Animation duration (default: 1s) |
--ai-delay | Animation delay (default: 0s) |
--ai-ease | Animation timing function (default: ease-in-out) |
--ai-secondary-opacity | Secondary layer opacity in duotone icons (default: 0.4) |
Global Theme
globals.css
CSS
:root {
--ai-color: #7cce24;
--ai-stroke-width: 1.75;
--ai-duration: 0.9s;
--ai-ease: cubic-bezier(0.22, 1, 0.36, 1);
}Per-Selector & Per-Icon Overrides
Component Styles
CSS
.card minimal-icon {
--ai-color: var(--accent);
--ai-size: 20px;
}
.my-badge {
--ai-color: #7cce24;
--ai-secondary-opacity: 0.25;
}Dark Mode & currentColor
Because color defaults to currentColor, icons inherit text color from their parent automatically. You can also set theme-specific overrides:
Dark Mode
CSS
[data-theme="dark"] {
--ai-color: #cbd5e1;
}
[data-theme="light"] {
--ai-color: #1c2d09;
}