Newdesign, craft & AI tools directoryisthereanytool.app

Home/Docs

Install and animate React icons

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.

Install

One icon (shadcn CLI)

Same command shown on each icon page:

$npx shadcn@latest add https://www.itshover.com/r/github-icon.json

Several icons

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.json

Manual install

  1. Run npm install motion
  2. Copy icons/types.ts from the repository
  3. Copy the icon TSX from the icon detail page into your project

Usage

Next.js App Router

In the App Router, the file that imports an icon component should be a Client Component. Server Components cannot use Motion hooks or refs.

Vite / React

In Vite or Create React App, import icons normally in any component—no "use client" directive is required.

API reference

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 SVG

Ref 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).

Accessibility

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.

FAQ

Is Its Hover free and what license applies?
Yes. Icon source on its Hover is licensed under Apache-2.0. See the LICENSE file in the GitHub repository for the full text.
Does it work with Next.js?
Yes. Icons are React components built with Motion. In the Next.js App Router, import them from a Client Component file (add "use client" at the top of your file) because Motion runs on the client.
Do I need Framer Motion or Motion?
Install the motion package (npm install motion). Its Hover icons import from "motion/react", not the legacy framer-motion package name.
How do I trigger animation without hover?
Attach a ref typed as AnimatedIconHandle and call startAnimation() or stopAnimation() from event handlers—for example onClick on a parent button.
How do I change size or color?
Pass size (number or CSS string), color (defaults to currentColor), strokeWidth, or className—the same props defined in icons/types.ts on every icon.
How many icons are in the library?
Its Hover ships 263 animated React icons. Browse them at https://www.itshover.com/icons or by category at https://www.itshover.com/icons/categories.

Browse icon categories · All icons