Phone Forwarded

An animated phone-forwarded lucide-style SVG icon built with Motion that plays a short head-and-shaft nudge animation on hover or when controlled imperatively via ref. It renders a phone handset with a forward arrow that slides and compresses on activation.

Phone Forwarded
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/phone-forwarded.json

Usage

usage.tsx
import { PhoneForwardedIcon } from "@/components/ui/phone-forwarded";export function Example() {  return <PhoneForwardedIcon />;}
  • Showing a call-forwarding or redirect-call feature in a settings or telephony UI
  • Adding a subtle micro-interaction to a contact, support, or call-routing button
  • Indicating that a phone call or message is being transferred or routed elsewhere
  • Replacing a static lucide phone-forward icon with an animated version that responds to hover or parent state

Examples

Hover-triggered icon in a button

The default uninteractive mode: the animation plays on mouse enter and resets on mouse leave.

hover-triggered-icon-in-a-button.tsx
import { PhoneForwardedIcon } from "@/components/ui/phone-forwarded";export function ForwardCallButton() {  return (    <button type="button" className="inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm">      <PhoneForwardedIcon size={18} />      Forward call    </button>  );}

Controlled via ref

Call startAnimation and stopAnimation from a parent through the forwarded ref, for example while a forwarding request is in progress.

controlled-via-ref.tsx
import { useRef } from "react";import { PhoneForwardedIcon, type PhoneForwardedIconHandle } from "@/components/ui/phone-forwarded";export function ForwardingStatus() {  const iconRef = useRef<PhoneForwardedIconHandle>(null);  return (    <div      onMouseEnter={() => iconRef.current?.startAnimation()}      onMouseLeave={() => iconRef.current?.stopAnimation()}    >      <PhoneForwardedIcon ref={iconRef} size={32} />    </div>  );}

Custom color and size

The icon inherits text color via currentColor, so Tailwind text utilities control its color.

custom-color-and-size.tsx
import { PhoneForwardedIcon } from "@/components/ui/phone-forwarded";export function ColoredIcon() {  return <PhoneForwardedIcon size={40} className="text-emerald-600 cursor-pointer" />;}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the rendered SVG in pixels.
classNamestring—Class name applied to the outer wrapper div, merged with cn().
onMouseEnter(e: React.MouseEvent<HTMLDivElement>) => void—Mouse enter handler. Called instead of the built-in hover animation when the ref handle is in use.
onMouseLeave(e: React.MouseEvent<HTMLDivElement>) => void—Mouse leave handler. Called instead of the built-in reset animation when the ref handle is in use.
refReact.Ref<PhoneForwardedIconHandle>—Forwarded ref exposing startAnimation() and stopAnimation() to control the animation imperatively.

Accessibility

  • The icon is decorative SVG with no title or aria-label; when it conveys meaning, wrap it in an element with an accessible name or add aria-label on the wrapper, for example aria-label="Forward call".
  • If the icon is purely decorative next to visible text, pass aria-hidden="true" through the spread props to hide it from assistive technology.
  • Hover-only animation provides no information on touch or keyboard; do not rely on it to communicate state, and use the ref API to reflect state changes visually and textually.
  • Respect reduced motion preferences by disabling imperative startAnimation calls when the user has prefers-reduced-motion enabled.

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 "Phone Forwarded" component (lucide-animated/phone-forwarded) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/phone-forwarded.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.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { PhoneForwardedIcon } from "@/components/ui/phone-forwarded";export function Example() {  return <PhoneForwardedIcon />;}```

Files & dependencies

  • phone-forwarded.tsx
dependenciesmotion

Looks similar, elsewhere