Hugeicons Animated

Component API

Shared props and ref methods for every animated icon.
1 min read

All generated icon components use the same wrapper contract.

Props#

PropTypeDefaultDescription
sizenumber28Sets the SVG width and height in pixels.
classNamestringAdds classes to the wrapper div.
refIconHandleEnables direct animation control.
...propsHTMLAttributes<HTMLDivElement>Passes standard div attributes to the wrapper.

The SVG uses currentColor. Set color or a text-color class on the wrapper to change the stroke color.

Ref methods#

MethodBehavior
startAnimation()Starts the icon's animation unless reduced motion is active or the animation is already running.
stopAnimation()Stops looping gestures and returns them to rest. Finite gestures finish their current beat.
Note

Each icon exports its own handle type, such as Notification03IconHandle or RefreshIconHandle.

Event handlers#

The icon preserves onMouseEnter and onMouseLeave handlers that you pass to it. Its automatic animation runs after your handler.

When you pass a ref, the component treats the icon as controlled and disables its automatic hover behavior.

Built with Docs7