banknotes

BanknotesIcon is an animated outline banknote icon from the heroicons-animated registry, built on motion/react. It wobbles like a banknote being flicked when hovered, or when startAnimation is called through its ref.

banknotes
LIVE · running in a sandboxed iframe
Installed with plain shadcn add · no workarounds · theme neutral (none shipped)
See how it was built

Installation

pnpm dlx shadcn@latest add @heroicons-animated/banknotes

Requires @heroicons-animated in the registries of your components.json (shadcn adds official directory namespaces automatically).

Usage

usage.tsx
import { BanknotesIcon } from "@/components/ui/banknotes";<BanknotesIcon size={28} className="text-foreground" />
  • Signaling a cash, payment, price, or money-related action or status next to a label or button
  • Adding a subtle playful hover flourish to pricing, checkout, or wallet UI
  • Triggering the wobble programmatically (for example on a button click or on a success state) through the imperative ref

Examples

Basic icon

Render the icon with default size (28) and hover animation.

basic-icon.tsx
import { BanknotesIcon } from "@/components/ui/banknotes";export default function Example() {  return <BanknotesIcon />;}

Sized and colored with a label

Set a custom size and color through className, which uses currentColor for the stroke.

sized-and-colored-with-a-label.tsx
import { BanknotesIcon } from "@/components/ui/banknotes";export function CashOnlyBadge() {  return (    <div className="flex items-center gap-2 text-emerald-600">      <BanknotesIcon size={32} />      <span className="font-semibold">Cash only</span>    </div>  );}

Imperative control from a button

Use the ref to call startAnimation and stopAnimation. Hovering the button drives the icon, and the ref handle replaces the built-in hover handlers.

imperative-control-from-a-button.tsx
import { useRef } from "react";import { BanknotesIcon, type BanknotesIconHandle } from "@/components/ui/banknotes";export function PayButton() {  const iconRef = useRef<BanknotesIconHandle>(null);  return (    <button      type="button"      className="inline-flex items-center gap-2 rounded-md border px-4 py-2"      onMouseEnter={() => iconRef.current?.startAnimation()}      onMouseLeave={() => iconRef.current?.stopAnimation()}    >      <BanknotesIcon ref={iconRef} size={20} />      Pay now    </button>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels. The SVG is always square and scales the 24x24 viewBox.
classNamestring—Class names applied to the outer div wrapper (via cn). Use it for color (text-*), margins, and layout. The stroke follows currentColor.
onMouseEnter(event: React.MouseEvent<HTMLDivElement>) => void—Inherited from HTMLAttributes<HTMLDivElement>. Called only when the icon is controlled through its ref. Otherwise the built-in hover animation runs and this handler is not invoked.
onMouseLeave(event: React.MouseEvent<HTMLDivElement>) => void—Inherited from HTMLAttributes<HTMLDivElement>. Called only when the icon is controlled through its ref. Otherwise the built-in reset animation runs and this handler is not invoked.
...HTMLAttributes<HTMLDivElement>HTMLAttributes<HTMLDivElement>—All other standard div attributes (id, style, role, aria-*, data-*, etc.) are spread onto the outer div wrapper, not the SVG.
refReact.Ref<BanknotesIconHandle>—Forwarded ref exposing BanknotesIconHandle with startAnimation() (plays the wobble) and stopAnimation() (returns to the normal pose). Using the ref switches the icon into controlled mode.

Accessibility

  • The SVG has no title, desc, or role. If the icon conveys meaning, pass role="img" and aria-label (for example aria-label="Cash") to the component, since attributes are spread onto the wrapper div.
  • If the icon is decorative next to visible text, leave it unlabeled or add aria-hidden="true" so screen readers do not announce it.
  • The animation is triggered only by mouse hover. Keyboard and touch users get no equivalent cue, so do not rely on the wobble to convey information; pair it with text.
  • Respect reduced motion preferences by disabling or skipping startAnimation when the user has prefers-reduced-motion enabled.
  • The wobble is a short 0.5s rotation and does not flash, so it is generally safe for photosensitivity concerns.

Docs written by anthropic:claude-haiku-5-5 from the registry source.

Use with Coding Agent

Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.

prompt.md
Use the "banknotes" component (heroicons-animated/banknotes) from its shadcn registry.1. Install it with: npx shadcn@latest add @heroicons-animated/banknotes2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: size, className, onMouseEnter, onMouseLeave, ...HTMLAttributes<HTMLDivElement>, ref.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { BanknotesIcon } from "@/components/ui/banknotes";<BanknotesIcon size={28} className="text-foreground" />```

Files & dependencies

  • banknotes.tsx
dependenciesmotion

Looks similar, elsewhere