A Arrow Down
An animated A-with-down-arrow icon (lucide a-arrow-down) built on motion/react that fades and scales the letter glyphs while the down arrow slides in. It hover-animates by default and exposes an imperative ref for programmatic start and stop.


Installed with plain
See how it was built shadcn add · no workarounds · theme neutral (none shipped)Installation
pnpm dlx shadcn@latest add https://lucide-animated.com/r/a-arrow-down.json
Usage
usage.tsx
import { AArrowDownIcon } from "@/components/ui/a-arrow-down";export function Example() { return <AArrowDownIcon className="text-foreground" size={28} />;}- Showing a sort-descending or text-size-decrease control in a toolbar, table header, or settings panel
- Adding a subtle hover micro-interaction to a navigation or menu item that conveys decreasing order
- Indicating a font-size reduction action in a rich text editor or typography controls
- Triggering the animation programmatically from a parent via ref, for example when a related action completes
Examples
Hover-animated toolbar button
Uses the default hover behavior inside a button to animate the icon when the pointer enters.
hover-animated-toolbar-button.tsx
import { AArrowDownIcon } from "@/components/ui/a-arrow-down";export function DecreaseFontButton() { return ( <button type="button" aria-label="Decrease font size" className="inline-flex h-9 w-9 items-center justify-center rounded-md hover:bg-accent"> <AArrowDownIcon size={20} /> </button> );}Programmatic control via ref
Drives the animation imperatively with startAnimation and stopAnimation through the forwarded ref.
programmatic-control-via-ref.tsx
import { useRef } from "react";import { AArrowDownIcon, type AArrowDownIconHandle } from "@/components/ui/a-arrow-down";export function SortDescendingControl() { const iconRef = useRef<AArrowDownIconHandle>(null); return ( <div onMouseEnter={() => iconRef.current?.startAnimation()} onMouseLeave={() => iconRef.current?.stopAnimation()} > <AArrowDownIcon ref={iconRef} size={24} /> </div> );}Colored icon in a menu item
Applies Tailwind color classes through className, since the stroke follows currentColor.
colored-icon-in-a-menu-item.tsx
import { AArrowDownIcon } from "@/components/ui/a-arrow-down";export function MenuItemIcon() { return ( <span className="flex items-center gap-2 text-sm"> <AArrowDownIcon className="text-blue-500" size={16} /> Decrease text size </span> );}API reference
PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels. Applied to both the width and height attributes of the svg element.
classNamestring—Class name applied to the outer wrapper div via cn(className). Use it to set color (currentColor), margin, or layout.
onMouseEnter(e: React.MouseEvent<HTMLDivElement>) => void—Mouse enter handler. Called after the component's own handler when the ref is not in use; when the imperative ref has been attached, this is the only behavior invoked and the built-in hover animation is skipped.
onMouseLeave(e: React.MouseEvent<HTMLDivElement>) => void—Mouse leave handler. Same controlled-mode behavior as onMouseEnter: when the imperative ref has been attached, this handler is invoked instead of the built-in reset animation.
refReact.Ref<AArrowDownIconHandle>—Forwarded ref exposing startAnimation() to play the animation and stopAnimation() to return to the normal state.
...propsHTMLAttributes<HTMLDivElement>—All other standard div attributes (id, style, aria-*, data-*, etc.) are spread onto the outer wrapper div.
Accessibility
- The icon is decorative SVG with no title or role; when it conveys meaning, place an aria-label or visually hidden text on the interactive parent such as a button.
- Wrap the icon in a button with aria-label (for example "Decrease font size") so screen readers announce the action rather than the glyph.
- The animation is hover-triggered and purely visual; do not rely on it to communicate state. Consider respecting prefers-reduced-motion by disabling startAnimation calls in your own code.
- Because the SVG uses currentColor, ensure the surrounding color 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 "A Arrow Down" component (lucide-animated/a-arrow-down) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/a-arrow-down.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 { AArrowDownIcon } from "@/components/ui/a-arrow-down";export function Example() { return <AArrowDownIcon className="text-foreground" size={28} />;}```Files & dependencies
- a-arrow-down.tsx
dependenciesmotion