cloud-arrow-up
CloudArrowUpIcon is an animated React cloud icon with an upward arrow that bounces briefly on hover, built on motion/react. It is a forwardRef component that exposes start and stop controls for programmatic animation.
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 { CloudArrowUpIcon } from "@/components/ui/cloud-arrow-up";export function Demo() { return <CloudArrowUpIcon size={28} className="text-foreground" />;}- Upload, sync, or save-to-cloud actions where a small hover cue improves affordance
- Status indicators that should visibly signal an in-progress cloud upload via the imperative handle
- Navigation items or toolbar buttons that need a lightweight, animated icon without a heavy animation library
- Empty states or dashboards that want a friendly, minimal animated accent
Examples
Basic hover icon
Renders the icon at 32px with a sky color. The arrow animates on mouse enter and resets on mouse leave.
import { CloudArrowUpIcon } from "@/components/ui/cloud-arrow-up";export function BasicExample() { return <CloudArrowUpIcon size={32} className="text-sky-500" />;}Imperative sync status
Uses the forwarded ref to start the arrow animation while a sync is running and stop it when the sync finishes.
import { useEffect, useRef } from "react";import { CloudArrowUpIcon, type CloudArrowUpIconHandle } from "@/components/ui/cloud-arrow-up";export function SyncStatus({ syncing }: { syncing: boolean }) { const ref = useRef<CloudArrowUpIconHandle>(null); useEffect(() => { if (syncing) { ref.current?.startAnimation(); } else { ref.current?.stopAnimation(); } }, [syncing]); return <CloudArrowUpIcon ref={ref} size={24} />;}Upload button with label
Places the icon inside a button next to a text label. The icon's own hover handler drives the animation.
import { CloudArrowUpIcon } from "@/components/ui/cloud-arrow-up";export function UploadButton() { return ( <button type="button" className="inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm"> <CloudArrowUpIcon size={20} /> Upload </button> );}API reference
Accessibility
- The SVG has no title, desc, or role, so it is decorative by default. If the icon conveys meaning on its own, wrap it or pass aria-label and role="img" to the wrapping div via props.
- When the icon is inside a labeled button or link, add aria-hidden is not needed for the SVG because it has no text content; the accessible name should come from the surrounding control's text.
- The animation is a small 2px vertical movement over 0.5 seconds. It is brief and non-looping, but consider respecting prefers-reduced-motion in your app by avoiding triggering startAnimation when the user prefers reduced motion.
- Hover-only animation is not available to touch or keyboard users. Do not rely on it to convey state; pair it with text or an aria-live status update when the icon signals progress.
- Color follows currentColor, so the icon keeps the contrast of the surrounding text color; verify contrast against the 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.
Use the "cloud-arrow-up" component (heroicons-animated/cloud-arrow-up) from its shadcn registry.1. Install it with: npx shadcn@latest add @heroicons-animated/cloud-arrow-up2. 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 { CloudArrowUpIcon } from "@/components/ui/cloud-arrow-up";export function Demo() { return <CloudArrowUpIcon size={28} className="text-foreground" />;}```Files & dependencies
- cloud-arrow-up.tsx