Usage & Triggers
Control icon style, animation type, trigger mode, sizing, and color with consistent props or HTML attributes.
React Components
Component Usage
TSX
import { Icon0Circle, Icon24HoursClock } from "@minimalicons/react";
export function Example() {
return (
<div className="flex gap-4">
<Icon0Circle variant="duotone" animation="auto" trigger="hover" size={28} />
<Icon24HoursClock variant="solid" animation="tada" trigger="loop" color="#7cce24" />
</div>
);
}Web Component (<minimal-icon>)
Custom Element
HTML
<minimal-icon
name="0-circle"
variant="duotone"
animation="auto"
trigger="hover"
size="28"
color="#7cce24"
></minimal-icon>Trigger Modes
| Trigger | Behavior |
|---|---|
hover | Plays the animation when the user hovers or focuses the icon (default). |
loop | Loops continuously, automatically pausing via IntersectionObserver when off-screen. |
mount | Plays once as soon as the icon mounts into the DOM. |
Sizing & Color
size accepts a number (interpreted as px) or any CSS length string. color sets --ai-color and defaults to currentColor.
Sizing & Color
TSX
<Icon0Circle size={24} /> // 24px
<Icon0Circle size="2rem" /> // 2rem
<Icon0Circle color="#7cce24" /> // explicit color
<Icon0Circle /> // inherits currentColor