minus-sign-circle

An animated minus-sign-in-circle icon that plays a short squash-and-stretch on hover: the minus bar compresses horizontally while the circle briefly scales down and bounces back. It is built with motion/react and exposes an imperative ref for manual start and stop control.

minus-sign-circle
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/minus-sign-circle

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

Usage

usage.tsx
import { MinusSignCircleIcon } from '@/icons/minus-sign-circle';export function Example() {  return <MinusSignCircleIcon className='text-red-500' size={32} />;}
  • Delete, remove, or collapse buttons where a playful hover cue helps users notice the action
  • Settings or cart rows where an item can be subtracted or decremented
  • Toolbar or CTA buttons that need a subtle, low-distraction micro-interaction
  • Interfaces that need to trigger the animation programmatically through a ref, for example on validation errors or after a successful action

Examples

Remove button with hover animation

Wrap the icon in a button for keyboard and screen reader access. The hover animation plays on the wrapping div when the pointer enters.

remove-button-with-hover-animation.tsx
import { MinusSignCircleIcon } from '@/icons/minus-sign-circle';export function RemoveButton({ onRemove }: { onRemove: () => void }) {  return (    <button type='button' onClick={onRemove} aria-label='Remove item' className='inline-flex text-red-500'>      <MinusSignCircleIcon size={24} />    </button>  );}

Programmatic trigger via ref

Passing a ref switches the icon to controlled mode, so hover no longer starts the animation automatically. Call startAnimation from your own logic.

programmatic-trigger-via-ref.tsx
'use client';import { useRef } from 'react';import { MinusSignCircleIcon, type MinusSignCircleIconHandle } from '@/icons/minus-sign-circle';export function DecrementStatus() {  const iconRef = useRef<MinusSignCircleIconHandle>(null);  return (    <div className='flex items-center gap-2'>      <MinusSignCircleIcon ref={iconRef} size={28} className='text-amber-500' />      <button type='button' onClick={() => iconRef.current?.startAnimation()}>        Decrease      </button>    </div>  );}

Inline in a cart row with accessible label

Mark the icon as decorative when a visible text label already describes the action, and keep the color set through className.

inline-in-a-cart-row-with-accessible-label.tsx
import { MinusSignCircleIcon } from '@/icons/minus-sign-circle';export function CartRow({ name, onDecrement }: { name: string; onDecrement: () => void }) {  return (    <div className='flex items-center justify-between'>      <span>{name}</span>      <button type='button' onClick={onDecrement} className='inline-flex items-center gap-1 text-neutral-700'>        <MinusSignCircleIcon size={20} aria-hidden='true' />        <span className='sr-only'>Decrease quantity of {name}</span>      </button>    </div>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the rendered SVG in pixels. The SVG is square and uses a 24x24 viewBox.
classNamestring—Class names applied to the outer div wrapper. Use it to set color through currentColor, for example text-red-500.
onMouseEnterMouseEventHandler<HTMLDivElement>—Called when the pointer enters the wrapper div. Runs before the built-in animation trigger.
onMouseLeaveMouseEventHandler<HTMLDivElement>—Called when the pointer leaves the wrapper div. Runs before the built-in stop logic, which does nothing because loops is false.
refRef<MinusSignCircleIconHandle>—Exposes startAnimation() and stopAnimation(). Attaching a ref disables automatic hover triggering. stopAnimation is a no-op for this icon since it does not loop.
...HTMLAttributes<HTMLDivElement>HTMLAttributes<HTMLDivElement>—All other standard div attributes such as id, style, aria-*, and data-* are forwarded to the outer wrapper div. Event handlers other than mouse enter and leave are also forwarded.

Accessibility

  • The SVG has no role or aria-label, so screen readers may skip it. For a meaningful icon, add role='img' and aria-label, or use a visible text label. For a decorative icon, add aria-hidden='true'.
  • The icon is not focusable and has no keyboard interaction. Wrap it in a button or link that has an accessible name when the icon triggers an action.
  • Hover-only animation does not reach keyboard users. Do not rely on the animation to convey state; pair it with text or an aria-live update.
  • The hook reads useReducedMotion from motion/react. When the user prefers reduced motion, startAnimation returns early and no animation plays.
  • Color follows currentColor, so the icon keeps the contrast of its surrounding text color. Verify contrast against the 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 "minus-sign-circle" component (hugeicons-animated/minus-sign-circle) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/minus-sign-circle2. 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 { MinusSignCircleIcon } from '@/icons/minus-sign-circle';export function Example() {  return <MinusSignCircleIcon className='text-red-500' size={32} />;}```

Files & dependencies

  • icons/minus-sign-circle.tsx
  • lib/use-icon-animation.ts
dependenciesmotion

Looks similar, elsewhere