Fingerprint
FingerprintIcon is an animated fingerprint SVG icon built with motion/react. On hover, its arc strokes draw in progressively, and it can also be controlled imperatively through a ref.


Installed with plain
See how it was built shadcn add · no workarounds · theme neutral (none shipped)Installation
pnpm dlx shadcn@latest add https://lucide-animated.com/r/fingerprint.json
Usage
usage.tsx
import { FingerprintIcon } from '@/components/ui/fingerprint';export default function Example() { return <FingerprintIcon className='text-foreground' size={32} />;}- Authentication or login screens where a biometric or fingerprint-verification affordance is needed
- Security, identity-verification, or 'scanning' states in onboarding and settings flows
- Hover-triggered micro-interactions on buttons, cards, or feature tiles that should feel polished
- Programmatic animations that need to start or stop on a parent-controlled state through a ref
Examples
Hover-triggered icon
By default the icon animates on mouse enter and resets on mouse leave, with no extra wiring.
hover-triggered-icon.tsx
import { FingerprintIcon } from '@/components/ui/fingerprint';export default function HoverExample() { return ( <div className='flex items-center gap-2 text-foreground'> <FingerprintIcon size={28} /> <span>Hover to verify</span> </div> );}Imperative control via ref
Attaching the ref switches the icon to controlled mode, so hover no longer animates it and the parent calls startAnimation or stopAnimation instead.
imperative-control-via-ref.tsx
import { useRef } from 'react';import { Button } from '@/components/ui/button';import { FingerprintIcon, type FingerprintIconHandle } from '@/components/ui/fingerprint';export default function ScanButton() { const ref = useRef<FingerprintIconHandle>(null); return ( <Button variant='outline' onMouseEnter={() => ref.current?.startAnimation()} onMouseLeave={() => ref.current?.stopAnimation()} > <FingerprintIcon ref={ref} size={20} className='mr-2' /> Sign in with fingerprint </Button> );}Custom mouse handlers in controlled mode
When the ref is attached, onMouseEnter and onMouseLeave are called as plain callbacks and do not trigger the built-in animation.
custom-mouse-handlers-in-controlled-mode.tsx
import { useRef } from 'react';import { FingerprintIcon, type FingerprintIconHandle } from '@/components/ui/fingerprint';export default function ControlledExample() { const ref = useRef<FingerprintIconHandle>(null); return ( <div className='inline-flex cursor-pointer rounded-md p-2 hover:bg-muted' onClick={() => ref.current?.startAnimation()} > <FingerprintIcon ref={ref} size={24} aria-label='Start fingerprint scan' role='img' /> </div> );}API reference
PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels. Applied to both the width and height attributes.
classNamestring—Class names applied to the outer wrapper div. Use it to set colour (via currentColor), margins, or layout.
onMouseEnter(e: React.MouseEvent<HTMLDivElement>) => void—Mouse-enter handler. When the ref is attached (controlled mode), it is called instead of the built-in animate start. Otherwise it runs alongside the default behaviour only if it is not replaced by the source logic; the built-in animation is skipped in controlled mode.
onMouseLeave(e: React.MouseEvent<HTMLDivElement>) => void—Mouse-leave handler. In controlled mode (ref attached) it is called instead of the built-in reset to the normal state.
refReact.Ref<FingerprintIconHandle>—Exposes FingerprintIconHandle with startAnimation() and stopAnimation(). Attaching it enables controlled mode.
...HTMLAttributes<HTMLDivElement>HTMLAttributes<HTMLDivElement>—All other standard div attributes (id, style, aria-*, role, data-*, onClick, etc.) are spread onto the outer wrapper div, not the SVG.
Accessibility
- The SVG has no title, desc, or aria-label by default, so screen readers may ignore it or read nothing useful. Add aria-label or role='img' to the wrapper when the icon conveys meaning, or aria-hidden='true' when it is purely decorative.
- The hover animation is decorative and conveys no state on its own. Do not rely on it alone to show that verification is in progress; pair it with visible text or an aria-live status message.
- Respect prefers-reduced-motion by disabling startAnimation calls or hover behaviour in your wrapper, since motion/react does not do this automatically.
- Animation is triggered by mouse events only, so keyboard and touch users get no equivalent. Trigger startAnimation from focus or click handlers when the icon is part of an interactive control.
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 "Fingerprint" component (lucide-animated/fingerprint) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/fingerprint.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, ...HTMLAttributes<HTMLDivElement>.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { FingerprintIcon } from '@/components/ui/fingerprint';export default function Example() { return <FingerprintIcon className='text-foreground' size={32} />;}```Files & dependencies
- fingerprint.tsx
dependenciesmotion