Stethoscope
An animated stethoscope icon from the lucide-animated registry, built on Motion. On hover it redraws its tubing and earpiece paths with a stroke-drawing effect, and it can also be controlled programmatically through a ref.


shadcn add · no workarounds · theme neutral (none shipped)Installation
Usage
import { StethoscopeIcon } from '@/components/ui/stethoscope';export default function Example() { return <StethoscopeIcon size={28} className='text-primary' />;}- Use it for healthcare, medical, clinic, or patient-care UI where a stethoscope icon represents doctors, checkups, or diagnostics.
- Use it as a hover-animated feature or navigation icon that adds motion without changing layout.
- Use it when you need an icon that can be started and stopped from parent code via a ref, for example to animate on a status change.
- Avoid it where a static icon is required or where continuous looping motion would be distracting.
Examples
Basic hover icon
Renders the icon with uncontrolled hover behavior. Hovering the wrapper plays the draw-on animation, and leaving it resets the icon.
import { StethoscopeIcon } from '@/components/ui/stethoscope';export default function BasicExample() { return ( <div className='flex items-center gap-2 text-sky-600'> <StethoscopeIcon size={32} /> <span className='text-sm font-medium'>Health check</span> </div> );}Controlled via ref
Uses the imperative handle to start and stop the animation from a button, which disables hover-driven animation for this instance.
import { useRef } from 'react';import { StethoscopeIcon } from '@/components/ui/stethoscope';import type { StethoscopeIconHandle } from '@/components/ui/stethoscope';export default function ControlledExample() { const ref = useRef<StethoscopeIconHandle>(null); return ( <div className='flex flex-col items-start gap-3'> <StethoscopeIcon ref={ref} size={40} className='text-emerald-600' /> <div className='flex gap-2'> <button type='button' onClick={() => ref.current?.startAnimation()}>Start</button> <button type='button' onClick={() => ref.current?.stopAnimation()}>Stop</button> </div> </div> );}Icon inside a list item
Places the icon beside a clinic menu label with the default size and a themed color class.
import { StethoscopeIcon } from '@/components/ui/stethoscope';export default function ListExample() { return ( <ul className='space-y-2'> <li className='flex items-center gap-3 rounded-md p-2 hover:bg-muted'> <StethoscopeIcon className='text-rose-500' /> <span>Consultations</span> </li> </ul> );}API reference
Accessibility
- The component renders a plain div and svg with no role or aria-label, so screen readers may ignore it or announce nothing. Add role='img' and aria-label on the wrapper when the icon conveys meaning, or aria-hidden='true' when it is decorative next to visible text.
- The animation is decorative and is triggered only by hover or by the ref. Keyboard users do not get a hover trigger, so do not rely on the animation to convey information.
- Animation is a short one-time draw-on (about 0.25s per path with stagger), not a loop. Consider respecting prefers-reduced-motion by skipping startAnimation calls when the user prefers reduced motion.
- The stroke uses currentColor, so the icon keeps sufficient contrast when the parent text color meets WCAG contrast requirements.
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 "Stethoscope" component (lucide-animated/stethoscope) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/stethoscope.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 { StethoscopeIcon } from '@/components/ui/stethoscope';export default function Example() { return <StethoscopeIcon size={28} className='text-primary' />;}```Files & dependencies
- stethoscope.tsx