phone-arrow-down-left

An animated phone-arrow-down-left icon for React, rendering a handset outline with an arrow that shifts diagonally when hovered. It is a forwardRef component that can be triggered by hover or controlled imperatively through startAnimation and stopAnimation.

phone-arrow-down-left
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/phone-arrow-down-left

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

Usage

usage.tsx
import { PhoneArrowDownLeftIcon } from "@/components/ui/phone-arrow-down-left";export function Example() {  return <PhoneArrowDownLeftIcon />;}
  • Showing an incoming call, call received, or inbound phone status in a UI such as a call log, contact card, or softphone panel.
  • Adding a subtle hover micro-interaction to a phone or contact button or link.
  • Triggering the arrow animation from application state (for example, a new call arriving) through the ref handle.
  • Replacing a static phone-received icon with an animated one in a navigation, dashboard, or support widget.

Examples

Hover-animated icon in a call log row

Default hover mode. The arrow animates on mouse enter and resets on mouse leave, with the color inherited from the text color.

hover-animated-icon-in-a-call-log-row.tsx
import { PhoneArrowDownLeftIcon } from '@/components/ui/phone-arrow-down-left';export function CallLogRow({ name, time }: { name: string; time: string }) {  return (    <div className='flex items-center gap-3 text-sm text-emerald-600'>      <PhoneArrowDownLeftIcon size={20} />      <span className='font-medium text-foreground'>{name}</span>      <span className='ml-auto text-muted-foreground'>{time}</span>    </div>  );}

Imperative control via ref

Use the exported handle type to start the animation from application logic, such as when a call comes in. Once a ref is attached, the component's own hover handlers stop animating and only forward onMouseEnter and onMouseLeave to the props.

imperative-control-via-ref.tsx
import { useRef } from 'react';import { PhoneArrowDownLeftIcon, type PhoneArrowDownLeftIconHandle } from '@/components/ui/phone-arrow-down-left';export function IncomingCallBadge() {  const iconRef = useRef<PhoneArrowDownLeftIconHandle>(null);  return (    <button      type='button'      className='inline-flex items-center gap-2 rounded-md border px-3 py-2'      onMouseEnter={() => iconRef.current?.startAnimation()}      onMouseLeave={() => iconRef.current?.stopAnimation()}    >      <PhoneArrowDownLeftIcon ref={iconRef} size={18} />      Incoming call    </button>  );}

Looping animation while a call is ringing

Starts the animation on a timer through the ref and stops it on cleanup, giving a repeating ringing cue.

looping-animation-while-a-call-is-ringing.tsx
import { useEffect, useRef } from 'react';import { PhoneArrowDownLeftIcon, type PhoneArrowDownLeftIconHandle } from '@/components/ui/phone-arrow-down-left';export function RingingIndicator({ active }: { active: boolean }) {  const iconRef = useRef<PhoneArrowDownLeftIconHandle>(null);  useEffect(() => {    if (!active) return;    const id = window.setInterval(() => {      iconRef.current?.startAnimation();      window.setTimeout(() => iconRef.current?.stopAnimation(), 500);    }, 1000);    return () => {      window.clearInterval(id);      iconRef.current?.stopAnimation();    };  }, [active]);  return <PhoneArrowDownLeftIcon ref={iconRef} className='text-emerald-600' />;}

Custom size and styling with a click handler

Passes size, className, and standard div attributes such as onClick and aria-label through the rest props.

custom-size-and-styling-with-a-click-handler.tsx
import { PhoneArrowDownLeftIcon } from '@/components/ui/phone-arrow-down-left';export function CallReceivedButton({ onOpen }: { onOpen: () => void }) {  return (    <div      role='button'      tabIndex={0}      aria-label='Open received calls'      onClick={onOpen}      onKeyDown={(e) => {        if (e.key === 'Enter' || e.key === ' ') onOpen();      }}      className='inline-flex cursor-pointer rounded-full p-2 hover:bg-accent'    >      <PhoneArrowDownLeftIcon size={32} className='text-blue-500' />    </div>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels. Applied to both the width and height attributes; the viewBox stays 0 0 24 24.
classNamestring—Class name applied to the outer div wrapper (the element that receives hover events), not to the svg. Passed through cn().
onMouseEnter(event: React.MouseEvent<HTMLDivElement>) => void—Mouse enter handler. When the component is controlled through the ref, it is called instead of starting the hover animation. Otherwise it is called after the built-in animation starts.
onMouseLeave(event: React.MouseEvent<HTMLDivElement>) => void—Mouse leave handler. When controlled through the ref, it is called instead of resetting the animation. Otherwise it is called after the built-in reset (in the source, the built-in reset is skipped only in controlled mode).
refReact.Ref<PhoneArrowDownLeftIconHandle>—Exposes startAnimation() (plays the arrow animation) and stopAnimation() (returns the arrow to its resting position). Attaching the ref switches the component into controlled mode, so hover no longer animates on its own.
...HTMLAttributes<HTMLDivElement>HTMLAttributes<HTMLDivElement>—All other standard div attributes (id, style, aria-*, role, onClick, tabIndex, and so on) are spread onto the outer wrapper div.

Accessibility

  • The icon is decorative and the SVG has no title or role. When it conveys meaning on its own, add aria-label or a visually hidden label on the wrapper or the containing control.
  • If you pass role='button' and onClick to the wrapper, also provide tabIndex={0}, keyboard handling for Enter and Space, and an accessible name.
  • Hover-only animation gives no information to keyboard or touch users. Do not rely on it to convey state; pair it with text or a status label.
  • The animation is a 0.5s translate; consider respecting prefers-reduced-motion by not calling startAnimation when the user prefers reduced motion.
  • The icon color follows currentColor, so ensure the surrounding text meets WCAG contrast requirements against its background.

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-arrow-down-left" component (heroicons-animated/phone-arrow-down-left) from its shadcn registry.1. Install it with: npx shadcn@latest add @heroicons-animated/phone-arrow-down-left2. 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, ...HTMLAttributes<HTMLDivElement>.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { PhoneArrowDownLeftIcon } from "@/components/ui/phone-arrow-down-left";export function Example() {  return <PhoneArrowDownLeftIcon />;}```

Files & dependencies

  • phone-arrow-down-left.tsx
dependenciesmotion

Looks similar, elsewhere