Receipt Euro

An animated receipt icon with a euro sign printed on it, built with Motion for React. On hover, or when controlled through a ref, the euro symbol draws itself in and a short line under it appears, with the receipt outline itself staying static.

Receipt Euro
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 https://lucide-animated.com/r/receipt-euro.json

Usage

usage.tsx
import { ReceiptEuroIcon } from "@/components/ui/receipt-euro";export function Example() {  return <ReceiptEuroIcon size={28} className="text-foreground" />;}
  • Showing euro-denominated invoices, receipts, expenses, or payment confirmations in a finance or e-commerce UI.
  • Adding a subtle hover micro-interaction to a currency or billing menu item or button.
  • Triggering the draw-in animation programmatically (for example after a successful purchase) through the ref handle.
  • Replacing a static receipt icon where a lightweight animated accent is desired.

Examples

Basic hover icon

Renders the icon at the default size of 28px. It animates automatically on mouse enter and leave.

basic-hover-icon.tsx
import { ReceiptEuroIcon } from "@/components/ui/receipt-euro";export function BasicExample() {  return <ReceiptEuroIcon />;}

Controlled animation via ref

Uses forwardRef handle to start and stop the animation from a parent, for example when a payment completes. Once a ref is attached, hover handling is delegated to the onMouseEnter and onMouseLeave props.

controlled-animation-via-ref.tsx
import { useRef } from "react";import { Button } from "@/components/ui/button";import { ReceiptEuroIcon, type ReceiptEuroIconHandle } from "@/components/ui/receipt-euro";export function ControlledExample() {  const iconRef = useRef<ReceiptEuroIconHandle>(null);  return (    <Button      variant="outline"      onMouseEnter={() => iconRef.current?.startAnimation()}      onMouseLeave={() => iconRef.current?.stopAnimation()}    >      <ReceiptEuroIcon ref={iconRef} size={18} />      View invoice    </Button>  );}

Larger icon in a card header

Shows the icon at a larger size with a themed color class, as a header accent for a billing card.

larger-icon-in-a-card-header.tsx
import { ReceiptEuroIcon } from "@/components/ui/receipt-euro";export function BillingHeader() {  return (    <div className="flex items-center gap-3">      <ReceiptEuroIcon size={40} className="text-emerald-600" />      <h2 className="text-lg font-semibold">Monthly statement</h2>    </div>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the rendered SVG in pixels.
classNamestring—Additional class names applied to the wrapping div. Stroke color follows currentColor, so set text color to change the icon color.
onMouseEnter(e: React.MouseEvent<HTMLDivElement>) => void—Mouse enter handler on the wrapper div. Called after the internal hover animation is bypassed when the ref handle is in use.
onMouseLeave(e: React.MouseEvent<HTMLDivElement>) => void—Mouse leave handler on the wrapper div. Called after the internal hover animation is bypassed when the ref handle is in use.
refReact.Ref<ReceiptEuroIconHandle>—Exposes startAnimation() which plays the draw-in animation and stopAnimation() which resets the icon to its normal state. Attaching the ref switches the component into controlled mode.
...propsHTMLAttributes<HTMLDivElement>—All other standard div attributes are spread onto the wrapper div, such as id, style, aria-label, and data attributes.

Accessibility

  • The SVG has no title or role, so the icon is decorative by default. Pair it with visible text or pass aria-label and role="img" on the wrapper via props when it conveys meaning on its own.
  • Motion is limited to stroke drawing and opacity. Consider respecting prefers-reduced-motion by wrapping the trigger logic, since the component does not check that media query itself.
  • Hover-only animation gives no feedback to keyboard or touch users. Always supply the same information through text or focus-visible states elsewhere.
  • Color comes from currentColor, so keep sufficient contrast against the background when setting a custom text color.

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 "Receipt Euro" component (lucide-animated/receipt-euro) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/receipt-euro.json2. 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, ref, ...props.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { ReceiptEuroIcon } from "@/components/ui/receipt-euro";export function Example() {  return <ReceiptEuroIcon size={28} className="text-foreground" />;}```

Files & dependencies

  • receipt-euro.tsx
dependenciesmotion

Looks similar, elsewhere