Accessibility

AccessibilityIcon is an animated SVG accessibility (wheelchair-user pictogram) icon built with motion/react. It plays a short hover animation where the head dot and figure parts move, and it can also be controlled imperatively through a ref.

Accessibility
LIVE · running in a sandboxed iframe
Installed with plain shadcn add · no workarounds · theme neutral (none shipped)
See how it was built

Installation

pnpm dlx shadcn@latest add https://lucide-animated.com/r/accessibility.json

Usage

usage.tsx
import { AccessibilityIcon } from "@/components/ui/accessibility";export default function Demo() {  return <AccessibilityIcon size={28} className="text-foreground" />;}
  • Marking up accessibility, universal access, or disability-support features such as settings panels, help menus, or accessibility toggles
  • Adding a playful hover micro-interaction to a nav item, button, or card that already has a text label
  • Showing a programmatically triggered animation, for example while a 'checking accessibility' step runs, by calling startAnimation and stopAnimation through a ref

Examples

Basic hover icon

Renders the icon at a custom size and color. It animates on mouse enter and resets on mouse leave.

basic-hover-icon.tsx
import { AccessibilityIcon } from "@/components/ui/accessibility";export default function BasicExample() {  return <AccessibilityIcon size={32} className="text-primary" />;}

Imperative control via ref

Attaching a ref switches the icon to controlled mode. Its built-in mouse handling is disabled, and the parent starts or stops the animation through the handle.

imperative-control-via-ref.tsx
import { useRef } from "react";import { AccessibilityIcon, type AccessibilityIconHandle } from "@/components/ui/accessibility";import { Button } from "@/components/ui/button";export default function ControlledExample() {  const iconRef = useRef<AccessibilityIconHandle>(null);  return (    <Button      variant="outline"      onMouseEnter={() => iconRef.current?.startAnimation()}      onMouseLeave={() => iconRef.current?.stopAnimation()}    >      <AccessibilityIcon ref={iconRef} size={16} />      Accessibility    </Button>  );}

Labeled navigation link

Pairs the decorative icon with a visible text label. The icon is hidden from assistive technology with aria-hidden, and the link keeps the accessible name.

labeled-navigation-link.tsx
import { AccessibilityIcon } from "@/components/ui/accessibility";export default function NavLinkExample() {  return (    <a      href="/settings/accessibility"      className="inline-flex items-center gap-2 text-sm font-medium"    >      <AccessibilityIcon aria-hidden="true" size={18} />      Accessibility settings    </a>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the inner SVG in pixels. The viewBox stays 0 0 24 24.
classNamestring—Class names applied to the wrapping div through cn(). Use it for color (text-*) and spacing.
onMouseEnter(e: React.MouseEvent<HTMLDivElement>) => void—Called on mouse enter. When a ref is attached, this handler replaces the built-in start animation, so the parent is responsible for calling startAnimation.
onMouseLeave(e: React.MouseEvent<HTMLDivElement>) => void—Called on mouse leave. When a ref is attached, this handler replaces the built-in leave behavior.
refReact.Ref<AccessibilityIconHandle>—Exposes startAnimation() and stopAnimation() through the AccessibilityIconHandle interface and switches the icon to controlled mode.
...propsHTMLAttributes<HTMLDivElement>—All other standard div attributes, such as id, style, aria-hidden, aria-label, and role, are spread onto the wrapping div.

Accessibility

  • The SVG has no title, desc, or role, so it is not announced by itself. Pair it with visible text, or give the wrapper an aria-label or role="img" when it is used alone.
  • If the icon is decorative next to a text label, pass aria-hidden="true" so screen readers do not read the pictogram.
  • The animation is a motion-only effect. Respect prefers-reduced-motion by gating startAnimation calls in controlled mode, or by skipping the ref in reduced-motion contexts.
  • Because the wrapper is a div with no keyboard handling, do not rely on hover alone. Put the icon inside a focusable button or link so keyboard users get the same context.
  • In uncontrolled mode, mouse leave calls controls.start("normal"), which is not a defined variant in this source, so the reset may not happen. Use the ref's stopAnimation() for a reliable reset.

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.

prompt.md
Use the "Accessibility" component (lucide-animated/accessibility) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/accessibility.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 { AccessibilityIcon } from "@/components/ui/accessibility";export default function Demo() {  return <AccessibilityIcon size={28} className="text-foreground" />;}```

Files & dependencies

  • accessibility.tsx
dependenciesmotion

Looks similar, elsewhere