Russian Ruble
RussianRubleIcon is an animated Russian ruble sign (₽) icon built on motion/react. On hover, or when started through its imperative ref, the vertical stroke and bowl draw in and the crossbar sweeps in from the right.


shadcn add · no workarounds · theme neutral (none shipped)Installation
Usage
import { RussianRubleIcon } from "@/components/ui/russian-ruble";export function Example() { return <RussianRubleIcon size={28} className="text-foreground" />;}- Showing a Russian ruble currency sign next to prices, balances, or payment options in a finance or e-commerce UI
- Adding a subtle hover animation to a currency label, button, or menu item that already uses lucide-style line icons
- Triggering the same draw-in animation programmatically (for example on step completion or when a value updates) through the exported ref handle
- Using a stroke-style icon that scales with font size or a size prop in dashboards, nav bars, or settings panels
Examples
Basic hover animation
Renders the icon with default size 28. Hovering the wrapper plays the draw-in animation and leaving it resets the glyph.
import { RussianRubleIcon } from "@/components/ui/russian-ruble";export default function BasicExample() { return ( <div className="flex items-center gap-2 text-zinc-900"> <RussianRubleIcon /> <span>Russian ruble</span> </div> );}Controlled animation via ref
Passing a ref switches the component into controlled mode. Hover handlers stop triggering the internal animation, so the parent drives it with startAnimation and stopAnimation.
import { useRef } from "react";import { RussianRubleIcon, type RussianRubleIconHandle } from "@/components/ui/russian-ruble";export default function ControlledExample() { const iconRef = useRef<RussianRubleIconHandle>(null); return ( <div onMouseEnter={() => iconRef.current?.startAnimation()} onMouseLeave={() => iconRef.current?.stopAnimation()} className="inline-flex cursor-pointer rounded-md border p-3" > <RussianRubleIcon ref={iconRef} size={32} /> </div> );}Icon inside a payment button
Uses a smaller size and inherits the button text color, pairing the icon with a label in a call-to-action button.
import { RussianRubleIcon } from "@/components/ui/russian-ruble";export default function PayButton() { return ( <button type="button" className="inline-flex items-center gap-2 rounded-md bg-emerald-600 px-4 py-2 text-white hover:bg-emerald-700" > <RussianRubleIcon size={16} /> <span>支払う</span> </button> );}API reference
Accessibility
- The SVG has no role, title, or aria-label, so screen readers ignore it by default. This is correct for purely decorative icons next to visible text.
- When the icon is the only content of a control, pass role="img" and aria-label (for example aria-label="Russian ruble") to the component, since those props are forwarded to the wrapper div.
- For an icon-only button, put the accessible name on the button itself (aria-label) and keep the icon decorative.
- The component does not check prefers-reduced-motion. Wrap usage in a media-query check or skip startAnimation when the user prefers reduced motion.
- Animation is hover- and ref-driven only, so keyboard users get no animation unless the parent triggers it on focus through the ref handle. Keep the meaning conveyed by text, not by the animation alone.
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.
Use the "Russian Ruble" component (lucide-animated/russian-ruble) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/russian-ruble.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 (HTMLAttributes<HTMLDivElement>).Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { RussianRubleIcon } from "@/components/ui/russian-ruble";export function Example() { return <RussianRubleIcon size={28} className="text-foreground" />;}```Files & dependencies
- russian-ruble.tsx