message-01

message-01 is an animated outline speech-bubble icon from the hugeicons-animated registry. On hover, the bubble pops with a small overshoot, then two reply lines draw themselves inside it.

message-01
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 @hugeicons-animated/message-01

Requires @hugeicons-animated in the registries of your components.json (shadcn adds official directory namespaces automatically).

Usage

usage.tsx
import { Message01Icon } from '@/icons/message-01';export default function Example() {  return <Message01Icon size={24} className='text-blue-600' />;}
  • Chat, messaging, or inbox UIs that need an animated message or notification icon
  • Navigation items or buttons that should react to hover with a subtle playful motion
  • Empty states or onboarding screens where a reply or new-message indicator needs emphasis
  • Controlling the animation imperatively from a parent via a ref, for example when a new message arrives

Examples

Hover-animated icon in a nav item

Uses the default hover behavior. The animation plays once on mouse enter.

hover-animated-icon-in-a-nav-item.tsx
import { Message01Icon } from '@/icons/message-01';export function InboxNavItem() {  return (    <a href='/inbox' className='flex items-center gap-2 text-sm font-medium'>      <Message01Icon size={20} />      <span>Messages</span>    </a>  );}

Trigger animation imperatively with a ref

Passing a ref disables hover handling and exposes startAnimation and stopAnimation. Here the animation plays when a new-message count changes.

trigger-animation-imperatively-with-a-ref.tsx
import { useEffect, useRef } from 'react';import { Message01Icon } from '@/icons/message-01';import type { Message01IconHandle } from '@/icons/message-01';export function UnreadBadgeIcon({ unread }: { unread: number }) {  const iconRef = useRef<Message01IconHandle>(null);  useEffect(() => {    if (unread > 0) iconRef.current?.startAnimation();  }, [unread]);  return <Message01Icon ref={iconRef} size={24} className='text-emerald-600' />;}

Icon button with an accessible label

Wraps the icon in a button and labels it with aria-label. The icon is decorative here, so the label carries the meaning.

icon-button-with-an-accessible-label.tsx
import { Message01Icon } from '@/icons/message-01';export function MessagesButton() {  return (    <button type='button' aria-label='Open messages' className='rounded-md p-2 hover:bg-accent'>      <Message01Icon size={20} />    </button>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels. The SVG viewBox is fixed at 0 0 24 24, so the icon scales proportionally.
classNamestring—Class name applied to the outer wrapper div. Use it for color (text-*), margin, or layout. The icon stroke uses currentColor.
onMouseEnterMouseEventHandler<HTMLDivElement>—Called on mouse enter before the built-in start animation runs. Skipped in the sense that the built-in animation is suppressed when a ref is attached.
onMouseLeaveMouseEventHandler<HTMLDivElement>—Called on mouse leave before the built-in stop logic runs. The stop only has an effect when the internal loops option is true, which this icon does not use.
refRef<Message01IconHandle>—Exposes startAnimation() and stopAnimation(). Attaching a ref switches the icon to controlled mode, so hover no longer triggers the animation. stopAnimation is a no-op for this non-looping icon.
...propsHTMLAttributes<HTMLDivElement>—All other standard div attributes (id, aria-*, data-*, style, role, tabIndex, and so on) are spread onto the outer wrapper div.

Accessibility

  • The SVG has no title, role, or aria-label. If the icon is used alone, pass aria-label or a visually hidden label through the wrapper div props, or wrap it in a labelled button or link.
  • When the icon is purely decorative next to visible text, add aria-hidden='true' on the wrapper to keep it out of the accessibility tree.
  • The animation respects the user's reduced-motion preference via useReducedMotion. When it is enabled, startAnimation does nothing and the icon stays static.
  • Hover-only animation gives no feedback to keyboard or touch users. Do not rely on it to convey state; pair it with text or a persistent indicator.
  • The icon color comes from currentColor, so ensure the surrounding text color meets WCAG contrast requirements against its background.

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 "message-01" component (hugeicons-animated/message-01) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/message-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, ref, ...props.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { Message01Icon } from '@/icons/message-01';export default function Example() {  return <Message01Icon size={24} className='text-blue-600' />;}```

Files & dependencies

  • icons/message-01.tsx
  • lib/use-icon-animation.ts
dependenciesmotion

Looks similar, elsewhere