rocket-01

rocket-01 is an animated rocket line icon from the hugeicons-animated registry. On hover it launches the rocket out of the frame with exhaust trails, and a fresh rocket arrives from the bottom-left.

rocket-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/rocket-01

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

Usage

usage.tsx
import { Rocket01Icon } from '@/components/icons/rocket-01';export function Example() {  return <Rocket01Icon size={28} className='text-foreground' />;}
  • Use it as a playful launch, ship, deploy, or 'go live' indicator on buttons, menu items, or onboarding steps.
  • Use it on hover-triggered feedback for product launches, changelog entries, or release announcements.
  • Use it when you need a programmatically triggered rocket animation through a ref (for example, after a successful action).
  • Avoid it where continuous motion would be distracting or where a static icon is enough; the animation runs once per hover.

Examples

Hover-to-launch in a button

Hover the rocket inside a labeled button to play the launch animation once.

hover-to-launch-in-a-button.tsx
import { Rocket01Icon } from '@/components/icons/rocket-01';export function LaunchButton() {  return (    <button type='button' className='inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm'>      <Rocket01Icon size={20} />      Launch    </button>  );}

Programmatic launch via ref

Attaching a ref disables hover triggering and lets the parent call startAnimation(), for example after a successful deploy.

programmatic-launch-via-ref.tsx
import { useRef } from 'react';import { Rocket01Icon, type Rocket01IconHandle } from '@/components/icons/rocket-01';export function DeployStatus() {  const iconRef = useRef<Rocket01IconHandle>(null);  return (    <div className='flex items-center gap-3'>      <Rocket01Icon ref={iconRef} size={32} className='text-emerald-600' />      <button type='button' onClick={() => iconRef.current?.startAnimation()}>        Deploy      </button>    </div>  );}

Custom size with mouse handlers

onMouseEnter and onMouseLeave are forwarded to the wrapper div and still run alongside the built-in animation trigger.

custom-size-with-mouse-handlers.tsx
import { Rocket01Icon } from '@/components/icons/rocket-01';export function ChangelogBadge() {  return (    <Rocket01Icon      size={24}      aria-label='New release'      role='img'      className='inline-block cursor-pointer text-blue-600'      onMouseEnter={() => console.log('rocket hover')}      onMouseLeave={() => console.log('rocket leave')}    />  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels. The viewBox stays 0 0 24 24.
classNamestring—Class names applied to the wrapper div (passed through cn). Use text color classes to color the stroke, since it uses currentColor.
onMouseEnterMouseEventHandler<HTMLDivElement>—Called on mouse enter of the wrapper div before the animation starts. Triggers the animation only when the ref is not attached.
onMouseLeaveMouseEventHandler<HTMLDivElement>—Called on mouse leave of the wrapper div. Only has an effect when loops is enabled internally, which this icon does not use.
refRef<Rocket01IconHandle>—Exposes startAnimation() and stopAnimation(). Attaching the ref switches the icon to controlled mode, so hover no longer triggers the animation. stopAnimation() is a no-op here because the icon does not loop.
HTMLAttributes<HTMLDivElement>props extension—All other standard div attributes (id, style, aria-*, role, data-*, etc.) are spread onto the wrapper div, not the svg.

Accessibility

  • The SVG has no title or aria-label. If the rocket conveys meaning, pass aria-label and role='img' to the wrapper div; otherwise it is decorative and can be hidden from assistive tech with aria-hidden.
  • The animation is hover-only and has no keyboard trigger. If the icon sits inside an interactive control, the control (not the icon) should be focusable and carry the accessible name.
  • Respects prefers-reduced-motion: the hook returns early when useReducedMotion() is true, so the launch animation does not play.
  • Animation is one-shot, about one second, so it does not produce persistent motion that could be disorienting.

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 "rocket-01" component (hugeicons-animated/rocket-01) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/rocket-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, HTMLAttributes<HTMLDivElement>.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { Rocket01Icon } from '@/components/icons/rocket-01';export function Example() {  return <Rocket01Icon size={28} className='text-foreground' />;}```

Files & dependencies

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

Looks similar, elsewhere