arrow-down-on-square-stack
An animated arrow-down-on-square-stack icon for React that stacks a rounded square outline with a downward arrow that nudges up and down on hover. It is built on motion/react and exposes an imperative handle for programmatic control.
shadcn add · no workarounds · theme neutral (none shipped)Installation
Requires @heroicons-animated in the registries of your components.json (shadcn adds official directory namespaces automatically).
Usage
import { ArrowDownOnSquareStackIcon } from "@/components/ui/arrow-down-on-square-stack";export function Example() { return <ArrowDownOnSquareStackIcon size={28} className="text-zinc-900" />;}- Showing a download, save-to-stack, or export action where a stacked-layers metaphor fits
- Adding a subtle hover micro-interaction to toolbar or sidebar buttons
- Triggering the arrow bounce programmatically, for example while a batch download is in progress
- Using a lightweight, theme-aware line icon that follows text color automatically
Examples
Hover-animated icon button
Wraps the icon in a button so the bounce plays when the user hovers the control.
import { ArrowDownOnSquareStackIcon } from "@/components/ui/arrow-down-on-square-stack";export function DownloadButton() { return ( <button type="button" aria-label="Save to stack" className="inline-flex items-center justify-center rounded-md p-2 hover:bg-zinc-100" > <ArrowDownOnSquareStackIcon size={20} /> </button> );}Programmatic control via ref
Uses the imperative handle to start and stop the animation from a parent, for example while an export runs.
import { useRef, useEffect } from "react";import { ArrowDownOnSquareStackIcon, type ArrowDownOnSquareStackIconHandle,} from "@/components/ui/arrow-down-on-square-stack";export function ExportStatus({ busy }: { busy: boolean }) { const iconRef = useRef<ArrowDownOnSquareStackIconHandle>(null); useEffect(() => { if (busy) { iconRef.current?.startAnimation(); } else { iconRef.current?.stopAnimation(); } }, [busy]); return <ArrowDownOnSquareStackIcon ref={iconRef} size={24} />;}Icon inside a menu item
Places the icon beside a text label in a menu row, using currentColor so it matches the row's text color.
import { ArrowDownOnSquareStackIcon } from "@/components/ui/arrow-down-on-square-stack";export function StackMenuItem() { return ( <div className="flex items-center gap-2 text-sm text-zinc-700"> <ArrowDownOnSquareStackIcon size={16} /> <span>Save to stack</span> </div> );}API reference
Accessibility
- The component renders no text or title, so pass aria-label or wrap it in a labeled button when it conveys an action.
- The SVG has no role or aria-hidden attribute; when the icon is purely decorative next to visible text, add aria-hidden="true" to the wrapper via props.
- Hover animation is purely visual and does not change focus or keyboard behavior; keyboard users should trigger the animation through a focusable parent using the ref handle if needed.
- Stroke uses currentColor, so keep sufficient contrast against the background in both light and dark themes.
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 "arrow-down-on-square-stack" component (heroicons-animated/arrow-down-on-square-stack) from its shadcn registry.1. Install it with: npx shadcn@latest add @heroicons-animated/arrow-down-on-square-stack2. 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 { ArrowDownOnSquareStackIcon } from "@/components/ui/arrow-down-on-square-stack";export function Example() { return <ArrowDownOnSquareStackIcon size={28} className="text-zinc-900" />;}```Files & dependencies
- arrow-down-on-square-stack.tsx