Home/Docs
Its Hover icons are Motion-powered React components. Install with the shadcn CLI or copy TSX manually, then control hover motion or call startAnimation() / stopAnimation() from a ref.
Same command shown on each icon page:
npx shadcn@latest add \
https://www.itshover.com/r/github-icon.json \
https://www.itshover.com/r/heart-icon.json \
https://www.itshover.com/r/plug-connected-icon.jsonnpm install motionicons/types.ts from the repositoryIn the App Router, the file that imports an icon component should be a Client Component. Server Components cannot use Motion hooks or refs.
In Vite or Create React App, import icons normally in any component—no "use client" directive is required.
Every icon accepts AnimatedIconProps from icons/types.ts:
size — number or CSS string (default 24 on most icons)color — SVG stroke/fill color (default currentColor)strokeWidth — number (default 2)className — extra classes on the root SVGRef handle: startAnimation() and stopAnimation().
"use client";
import { useRef } from "react";
import type { AnimatedIconHandle } from "@/icons/types";
import HeartIcon from "@/icons/heart-icon";
export function HeartButton() {
const iconRef = useRef<AnimatedIconHandle>(null);
return (
<button
type="button"
onMouseEnter={() => iconRef.current?.startAnimation()}
onMouseLeave={() => iconRef.current?.stopAnimation()}
>
<HeartIcon ref={iconRef} size={32} />
</button>
);
}Some icons document extra props on their detail page (for example trash-icon custom booleans).
Most icons render as inline SVG without aria-hidden by default. Decorative uses should set aria-hidden on the icon or provide an accessible name on a parent control. Motion does not automatically respect prefers-reduced-motion in every icon; wrap animations or conditionally call stopAnimation() when matchMedia('(prefers-reduced-motion: reduce)') matches.