Map Pin Check Inside
An animated map-pin icon with a check mark inside, built on motion/react. On hover it bounces up and settles, then the check draws in; it can also be driven imperatively through a ref.


shadcn add · no workarounds · theme neutral (none shipped)Installation
Usage
import { MapPinCheckInsideIcon } from "@/components/ui/map-pin-check-inside"; export default function Example() { return <MapPinCheckInsideIcon size={28} className="text-emerald-600" />; }- Showing a confirmed, verified, or saved location (for example, an address was validated or a store was checked in).
- Adding a playful micro-interaction to a location-related button, card, or list row.
- Replacing a static map-pin icon where a success state should be visible on hover or on demand.
- Triggering the check-in animation programmatically after an async action succeeds, using the exposed ref handle.
Examples
Hover-to-animate icon with custom size and color
The default hover behavior. The icon is sized with the size prop and colored via Tailwind text utilities because stroke uses currentColor.
import { MapPinCheckInsideIcon } from "@/components/ui/map-pin-check-inside";export default function HoverPin() { return <MapPinCheckInsideIcon size={32} className="text-emerald-600 cursor-pointer" />;}Programmatic control via ref
Attach a ref typed as MapPinCheckInsideIconHandle and call startAnimation or stopAnimation from your own logic, for example after a location is verified.
import { useRef } from "react";import { MapPinCheckInsideIcon } from "@/components/ui/map-pin-check-inside";import type { MapPinCheckInsideIconHandle } from "@/components/ui/map-pin-check-inside";export default function VerifyAddress() { const iconRef = useRef<MapPinCheckInsideIconHandle>(null); return ( <div onClick={() => iconRef.current?.startAnimation()} className="inline-flex items-center gap-2"> <MapPinCheckInsideIcon ref={iconRef} size={24} className="text-sky-600" /> <span>Verify address</span> </div> );}Check-in list row
Use the icon inside a list item to show a checked-in state. Hovering the row animates the pin.
import { MapPinCheckInsideIcon } from "@/components/ui/map-pin-check-inside";export default function CheckInRow({ place }: { place: string }) { return ( <li className="flex items-center gap-3 rounded-md p-2 hover:bg-muted"> <MapPinCheckInsideIcon size={20} className="text-green-600" /> <span className="text-sm">{place}</span> </li> );}API reference
Accessibility
- The SVG has no title, desc, or role, so it is decorative. If the icon conveys meaning on its own, wrap it in an element with role="img" and aria-label, or add a visible text label next to it.
- When the icon is inside an interactive element such as a button, add an accessible name to the button (aria-label or visible text) and mark the icon itself as aria-hidden="true" by passing it through the spread props.
- The animation is purely visual and conveys no information that is not also available as text, so it does not need to be disabled for correctness. Consider respecting prefers-reduced-motion in consuming components if motion sensitivity is a concern.
- Stroke uses currentColor, so keep sufficient contrast between the icon color and its background (WCAG 1.4.11 non-text contrast of at least 3:1).
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 "Map Pin Check Inside" component (lucide-animated/map-pin-check-inside) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/map-pin-check-inside.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, ref, onMouseEnter, onMouseLeave, ...HTMLAttributes<HTMLDivElement>.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { MapPinCheckInsideIcon } from "@/components/ui/map-pin-check-inside"; export default function Example() { return <MapPinCheckInsideIcon size={28} className="text-emerald-600" />; }```Files & dependencies
- map-pin-check-inside.tsx