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.
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 { 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.
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.
'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.
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
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.
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