Corner Right Down
An animated corner-right-down arrow icon built on motion/react that stretches vertically and nudges downward on hover, with an imperative ref API for programmatic control. It renders an inline SVG at a configurable size and uses currentColor for its stroke.


shadcn add · no workarounds · theme neutral (none shipped)Installation
Usage
import { CornerRightDownIcon } from "@/components/ui/corner-right-down";export default function Example() { return <CornerRightDownIcon />;}- Indicating a move, continuation, or downward-right navigation step in menus, breadcrumbs, or flow diagrams
- Adding a subtle hover micro-interaction to buttons, list items, or links that lead to a next or nested item
- Decorating call-to-action or 'go down/next' controls where the icon should react to user intent
- Driving the animation programmatically (for example, when a step becomes active) through the forwarded ref
Examples
Hover-triggered icon inside a button
The default hover behavior plays the stretch animation when the pointer enters the wrapper div.
import { CornerRightDownIcon } from "@/components/ui/corner-right-down";export default function NextButton() { return ( <button className="inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm"> Continue <CornerRightDownIcon size={18} className="text-zinc-700" /> </button> );}Programmatic control via ref
Using the forwarded ref switches the component to controlled mode, so hover no longer triggers the animation and startAnimation/stopAnimation drive it instead.
"use client";import { useRef } from "react";import { CornerRightDownIcon, type CornerRightDownIconHandle } from "@/components/ui/corner-right-down";export default function ControlledIcon() { const iconRef = useRef<CornerRightDownIconHandle>(null); return ( <div onMouseEnter={() => iconRef.current?.startAnimation()} onMouseLeave={() => iconRef.current?.stopAnimation()} > <CornerRightDownIcon ref={iconRef} size={32} /> </div> );}Animating a list item when it becomes active
Starts the animation once a step is selected, without relying on hover.
"use client";import { useEffect, useRef } from "react";import { CornerRightDownIcon, type CornerRightDownIconHandle } from "@/components/ui/corner-right-down";export default function ActiveStep({ active }: { active: boolean }) { const iconRef = useRef<CornerRightDownIconHandle>(null); useEffect(() => { if (active) iconRef.current?.startAnimation(); else iconRef.current?.stopAnimation(); }, [active]); return <CornerRightDownIcon ref={iconRef} size={24} />;}API reference
Accessibility
- The rendered SVG has no title, desc, or aria-label; if the icon conveys meaning on its own, pass aria-label or role="img" via props on the wrapper div.
- If the icon is decorative beside visible text, add aria-hidden="true" to the component so screen readers skip it.
- The animation is purely visual and does not convey state; do not rely on the motion alone to communicate information.
- Respect reduced-motion preferences by gating startAnimation calls or hover handling with a prefers-reduced-motion check in the consuming app, since the component does not check it internally.
- Inside an interactive element such as a button, the icon inherits the element's accessible name, so ensure the button has text or an aria-label.
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 "Corner Right Down" component (lucide-animated/corner-right-down) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/corner-right-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 { CornerRightDownIcon } from "@/components/ui/corner-right-down";export default function Example() { return <CornerRightDownIcon />;}```Files & dependencies
- corner-right-down.tsx