message-add-01

An animated message-add icon from the hugeicons-animated registry. It draws a speech-bubble outline with two text lines and a plus mark in the upper-right corner, and plays a short bounce-and-pop animation on hover or when started through a ref.

message-add-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-add-01

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

Usage

usage.tsx
import { MessageAdd01Icon } from '@/components/ui/message-add-01';export function Example() {  return <MessageAdd01Icon size={28} className="text-foreground" />;}
  • Use for compose, new chat, or new message buttons in messaging and inbox UIs.
  • Use as a decorative or affordance icon next to 'New conversation' or 'Add message' actions where a subtle hover motion adds emphasis.
  • Use when you need an icon that can be triggered programmatically (for example after a successful send) through its ref handle.
  • Avoid in dense toolbars where a static icon is preferred, or where motion must be suppressed for every user; the component already respects prefers-reduced-motion.

Examples

Hover-animated icon inside a button

Places the icon inside a button so it animates when the pointer enters the icon area.

hover-animated-icon-inside-a-button.tsx
import { MessageAdd01Icon } from '@/components/ui/message-add-01';export function NewChatButton() {  return (    <button type="button" className="inline-flex items-center gap-2 rounded-md px-3 py-2 text-sm">      <MessageAdd01Icon size={20} />      <span>New chat</span>    </button>  );}

Programmatic trigger through ref

Uses the exported MessageAdd01IconHandle to start the animation on demand. When a ref is attached, hover does not auto-play, so the animation only runs when startAnimation is called.

programmatic-trigger-through-ref.tsx
import { useRef } from 'react';import { MessageAdd01Icon, type MessageAdd01IconHandle } from '@/components/ui/message-add-01';export function SendFeedback() {  const iconRef = useRef<MessageAdd01IconHandle>(null);  return (    <div>      <MessageAdd01Icon ref={iconRef} size={32} />      <button type="button" onClick={() => iconRef.current?.startAnimation()}>        Play      </button>    </div>  );}

Custom size and color

Sets the pixel size through the size prop and the color through className, since the strokes use currentColor.

custom-size-and-color.tsx
import { MessageAdd01Icon } from '@/components/ui/message-add-01';export function ComposeHeader() {  return (    <header className="flex items-center justify-between p-4">      <h2 className="text-lg font-semibold">Messages</h2>      <MessageAdd01Icon size={24} className="text-blue-600 cursor-pointer" aria-label="Compose message" role="img" />    </header>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels. The viewBox stays 0 0 24 24.
classNamestring—Class name applied to the outer wrapping div. Passed through cn(). Use text color utilities to change the stroke color, since strokes use currentColor.
onMouseEnterMouseEventHandler<HTMLDivElement>—Called before the built-in hover animation starts on the wrapping div. Forwarded to the animation hook.
onMouseLeaveMouseEventHandler<HTMLDivElement>—Called on mouse leave of the wrapping div. Forwarded to the animation hook.
refRef<MessageAdd01IconHandle>—Exposes MessageAdd01IconHandle with startAnimation() and stopAnimation(). Attaching a ref switches the icon to controlled mode, so hover no longer auto-plays the animation. stopAnimation currently has no effect because the hook is called with loops set to false.
...propsHTMLAttributes<HTMLDivElement>—Any other standard div attributes (id, style, aria-*, data-*, etc.) are spread onto the wrapping div. Note that the SVG itself has no aria attributes set by the component.

Accessibility

  • The icon is decorative by default: the SVG has no title, role, or aria-label. When it conveys meaning on its own, add aria-label and role="img" to the wrapper, or place it next to visible text.
  • Motion respects prefers-reduced-motion: the animation is skipped when the user has reduced motion enabled, so no extra handling is needed.
  • Because the wrapper is a div with mouse handlers and no key handling, it is not keyboard-focusable. If the icon is the only control, wrap it in a button or link that provides focus and keyboard activation.
  • Ensure the color set through className has sufficient contrast against its background, since the stroke uses currentColor.
  • The SVG is non-scaling in the sense of a fixed size prop, so pair it with text or a label when the icon appears in a small or zoomed layout.

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-add-01" component (hugeicons-animated/message-add-01) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/message-add-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 { MessageAdd01Icon } from '@/components/ui/message-add-01';export function Example() {  return <MessageAdd01Icon size={28} className="text-foreground" />;}```

Files & dependencies

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

Looks similar, elsewhere