edit-02
edit-02 is an animated edit icon from the hugeicons-animated registry. It renders a pencil outline with a baseline underline in an SVG and plays a short scribble-and-draw animation on hover or when triggered through a ref.
shadcn add · no workarounds · theme neutral (none shipped)Installation
Requires @hugeicons-animated in the registries of your components.json (shadcn adds official directory namespaces automatically).
Usage
import { Edit02Icon } from '@/icons/edit-02';export function EditButtonIcon() { return <Edit02Icon size={20} className="text-foreground" />;}- Use as an edit, compose, or rename action in toolbars, table row actions, and form headers.
- Use where a subtle hover-triggered motion should signal that content is editable.
- Use with a ref when the animation should be triggered by app logic, such as after a save or on focus.
- Avoid in dense icon-only menus where the motion may distract, or where reduced motion must be strictly respected without a static fallback.
Examples
Basic hover icon
Renders the icon at the default 28px size. The animation plays on mouse enter.
import { Edit02Icon } from '@/icons/edit-02';export default function Example() { return <Edit02Icon />;}Triggered via ref
Disables hover handling and plays the animation programmatically through the exposed handle.
import { useRef } from 'react';import { Edit02Icon, type Edit02IconHandle } from '@/icons/edit-02';export default function Example() { const ref = useRef<Edit02IconHandle>(null); return ( <div onClick={() => ref.current?.startAnimation()}> <Edit02Icon ref={ref} size={24} /> </div> );}Sized and styled row action
Uses size and className to match a compact toolbar and forwards a mouse handler.
import { Edit02Icon } from '@/icons/edit-02';export default function Example() { return ( <Edit02Icon size={16} className="text-muted-foreground hover:text-foreground cursor-pointer" onMouseEnter={() => console.log('hover')} /> );}API reference
Accessibility
- The icon is decorative by default and renders no role or label; add aria-label or visually hidden text on the parent button or link when it conveys the only meaning.
- When used inside an interactive element, make sure the parent is focusable and keyboard operable, since the animation only responds to mouse enter.
- Animation is skipped when the user has enabled prefers-reduced-motion, via useReducedMotion in the shared hook.
- Set aria-hidden="true" on the wrapper through spread props when a visible text label already describes the action.
- The SVG uses currentColor, so ensure the chosen text color meets 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.
Use the "edit-02" component (hugeicons-animated/edit-02) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/edit-022. 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 { Edit02Icon } from '@/icons/edit-02';export function EditButtonIcon() { return <Edit02Icon size={20} className="text-foreground" />;}```Files & dependencies
- icons/edit-02.tsx
- lib/use-icon-animation.ts