arrow-turn-up-left
An animated outline arrow-turn-up-left icon for React, built on motion/react. It stretches and nudges horizontally on hover, or on demand through a ref handle.
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 { ArrowTurnUpLeftIcon } from "@/components/ui/arrow-turn-up-left";export function Example() { return <ArrowTurnUpLeftIcon size={28} className="text-foreground" />;}- Undo, return, or reply actions in buttons, toolbars, and menus that need a subtle hover micro-interaction
- Navigation or back affordances where a playful, icon-level motion adds feedback without a heavy animation
- Interfaces that must trigger the icon animation programmatically, such as after a successful action, by calling startAnimation through a ref
- CTA or menu items that need a stylish, lively icon (ボタン・かっこいいアイコン・動きのあるUI)
Examples
Hover-animated icon inside a button
Uncontrolled usage. The icon animates on mouse enter and resets on mouse leave without any ref.
import { ArrowTurnUpLeftIcon } from "@/components/ui/arrow-turn-up-left";export function UndoButton() { return ( <button type="button" className="inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm"> <ArrowTurnUpLeftIcon size={20} /> <span>Undo</span> </button> );}Programmatic control via ref
Passing a ref switches the component to controlled mode. Hover no longer animates it; call startAnimation and stopAnimation instead.
import { useRef } from "react";import { Button } from "@/components/ui/button";import { ArrowTurnUpLeftIcon, type ArrowTurnUpLeftIconHandle,} from "@/components/ui/arrow-turn-up-left";export function ReplyButton() { const iconRef = useRef<ArrowTurnUpLeftIconHandle>(null); return ( <Button variant="outline" onMouseEnter={() => iconRef.current?.startAnimation()} onMouseLeave={() => iconRef.current?.stopAnimation()} > <ArrowTurnUpLeftIcon ref={iconRef} size={16} className="mr-2" /> Reply </Button> );}Sized and colored icon in a navigation list
Sets a custom size and colors the icon with Tailwind classes through className, since it uses currentColor.
import { ArrowTurnUpLeftIcon } from "@/components/ui/arrow-turn-up-left";export function BackNav() { return ( <nav aria-label="Breadcrumb"> <a href="/" className="flex items-center gap-1 text-blue-600 hover:underline"> <ArrowTurnUpLeftIcon size={18} className="text-blue-600" /> Back to home </a> </nav> );}API reference
Accessibility
- The SVG has no title, role, or aria-label. If the icon is decorative (beside visible text), leave it as is or add aria-hidden="true" on the component wrapper via props.
- When the icon is the only content of a button or link, give that interactive element an accessible name, such as aria-label="Undo", because the icon itself carries no text.
- Hover-only animation does not work on touch devices. Do not rely on the animation to convey state or meaning; pair it with text or a state change.
- The component does not check prefers-reduced-motion by itself. Wrap the tree in <MotionConfig reducedMotion="user"> from motion/react to respect the user's motion preference.
- The icon is 1.5px strokes in currentColor. Keep the color contrast of the surrounding text at WCAG 2.1 AA (3:1 for non-text graphics).
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-turn-up-left" component (heroicons-animated/arrow-turn-up-left) from its shadcn registry.1. Install it with: npx shadcn@latest add @heroicons-animated/arrow-turn-up-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, ...HTMLAttributes<HTMLDivElement>, ref.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { ArrowTurnUpLeftIcon } from "@/components/ui/arrow-turn-up-left";export function Example() { return <ArrowTurnUpLeftIcon size={28} className="text-foreground" />;}```Files & dependencies
- arrow-turn-up-left.tsx