music-note-01
An animated music note icon that plays a small band-like loop on hover: the beamed note sways, its two note heads pulse on alternating beats, and tiny notes float up and fade. It is a 28px stroke icon built on motion/react and can also be controlled imperatively 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 { MusicNote01Icon } from '@/components/ui/music-note-01';export function Example() { return <MusicNote01Icon />;}- Music, audio, podcast, or playlist UI where a tune or sound being played should be signaled by motion.
- Hover-triggered feedback on a music-related navigation item, button, or card that needs a lively but subtle cue.
- Imperative playback indicators where a parent component starts or stops the animation through a ref, such as when a track begins or ends.
- Decorative icon accents in marketing or landing sections where a lightweight motion-based icon is preferred over a static SVG.
Examples
Basic hover animation
Renders the icon at its default 28px size. The animation plays while the pointer is over it and stops on leave.
import { MusicNote01Icon } from '@/components/ui/music-note-01';export function BasicExample() { return <MusicNote01Icon />;}Custom size and color
Sets a larger size and uses a Tailwind text color utility. The icon draws with currentColor, so the class on the wrapper controls its stroke color.
import { MusicNote01Icon } from '@/components/ui/music-note-01';export function ColoredExample() { return <MusicNote01Icon size={40} className="text-violet-500" />;}Imperative control via ref
Uses the exported handle type to start the animation programmatically, for example when a track starts playing. Once a ref is attached, hover no longer starts the animation automatically.
'use client';import { useRef } from 'react';import { MusicNote01Icon, type MusicNote01IconHandle } from '@/components/ui/music-note-01';export function NowPlaying() { const iconRef = useRef<MusicNote01IconHandle>(null); return ( <button type="button" onClick={() => iconRef.current?.startAnimation()} onMouseLeave={() => iconRef.current?.stopAnimation()} > <MusicNote01Icon ref={iconRef} size={24} /> </button> );}Icon inside a navigation link
Places the icon beside a text label so hovering the whole link triggers the animation.
import { MusicNote01Icon } from '@/components/ui/music-note-01';export function NavItem() { return ( <a href="/playlists" className="inline-flex items-center gap-2"> <MusicNote01Icon size={20} /> <span>Playlists</span> </a> );}API reference
Accessibility
- The icon is decorative by default. It has no role, title, or aria-label, so if it conveys meaning, pass aria-label and role="img" through the spread div props, or hide it with aria-hidden="true" when adjacent text already describes the content.
- The animation is disabled automatically when the user prefers reduced motion (useReducedMotion), so startAnimation becomes a no-op in that case.
- Hover is a pointer-only trigger. Keyboard and touch users will not see the animation unless the parent calls startAnimation through the ref, so do not rely on it to convey state.
- The wrapper div is not focusable by default. If the icon acts as a control, wrap it in a button or link that provides focus and keyboard activation.
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 "music-note-01" component (hugeicons-animated/music-note-01) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/music-note-012. 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, ...HTMLAttributes<HTMLDivElement>, ref.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { MusicNote01Icon } from '@/components/ui/music-note-01';export function Example() { return <MusicNote01Icon />;}```Files & dependencies
- icons/music-note-01.tsx
- lib/use-icon-animation.ts