party
An animated party icon in the hugeicons-animated set: a party popper that recoils and releases confetti dots and streamers when hovered or when startAnimation() is called through a ref. It is built on motion/react and renders an inline SVG at 28px by default.
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 { PartyIcon } from '@/components/icons/party';export function Example() { return <PartyIcon />;}- Celebration or success moments such as 'Completed', 'Welcome', birthday or launch banners where a playful hover cue adds emphasis.
- Button or menu items that announce an event, promotion, or party-themed feature and benefit from a hover-triggered micro-interaction.
- Interfaces that need to trigger the confetti burst programmatically (for example after a form submit) by holding a ref and calling startAnimation().
- Feature labels or empty states that want a decorative icon with a one-shot animation rather than a looping one.
Examples
Basic hover animation
Renders the icon at its default 28px size. The animation plays once on mouse enter.
import { PartyIcon } from '@/components/icons/party';export function Basic() { return <PartyIcon />;}Inside a button with a custom size
Uses the size prop to shrink the icon to fit alongside button text. The stroke color follows the button's text color.
import { PartyIcon } from '@/components/icons/party';export function PartyButton() { return ( <button type='button' className='inline-flex items-center gap-2 rounded-md border px-4 py-2'> <PartyIcon size={20} /> Celebrate </button> );}Triggering the animation through a ref
Attaches a ref typed as PartyIconHandle and calls startAnimation() on click. Hover no longer triggers the animation for a controlled ref.
import { useRef } from 'react';import { PartyIcon, type PartyIconHandle } from '@/components/icons/party';export function Celebrate() { const ref = useRef<PartyIconHandle>(null); return ( <div className='flex items-center gap-3'> <PartyIcon ref={ref} /> <button type='button' onClick={() => ref.current?.startAnimation()}> Play </button> </div> );}Labelled icon with a hover callback
Passes an accessible label and role, plus an onMouseEnter handler that is forwarded before the built-in animation starts.
import { PartyIcon } from '@/components/icons/party';export function Badge() { return ( <PartyIcon size={16} className='text-amber-500' role='img' aria-label='Party' onMouseEnter={() => console.log('hover')} /> );}API reference
Accessibility
- The component sets no role or aria-label by itself. When the icon conveys meaning, add role='img' and an aria-label on it (both pass through to the wrapper div).
- When the icon is purely decorative next to visible text, add aria-hidden='true' so screen readers skip it.
- The wrapper div is not focusable and has no keyboard handler. The animation is a mouse-hover or ref-driven visual cue; do not rely on it as the only way to convey information or trigger an action.
- The animation respects the user's reduced-motion preference via useReducedMotion, so startAnimation() and hover playback are skipped when reduced motion is requested.
- Because the animation is decorative, avoid placing essential status information only inside the confetti motion; pair it with text when communicating success.
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 "party" component (hugeicons-animated/party) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/party2. 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 (HTMLAttributes<HTMLDivElement>).Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { PartyIcon } from '@/components/icons/party';export function Example() { return <PartyIcon />;}```Files & dependencies
- icons/party.tsx
- lib/use-icon-animation.ts