information-circle
An animated information-circle icon from the hugeicons-animated registry. A thin outlined circle with an info dot and stem pulses and bounces once on hover, or on demand through a ref handle.
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 { InformationCircleIcon } from '@/components/ui/information-circle';export default function Example() { return <InformationCircleIcon />;}- Showing an info, help, or hint affordance next to labels, form fields, or settings rows.
- Adding a subtle hover micro-interaction to an info button or tooltip trigger.
- Triggering the animation programmatically (for example when a notice appears) through the ref handle.
- Use a static information icon instead when motion must be avoided or the user prefers reduced motion.
Examples
Basic hover animation
Renders the icon at the default 28px size. The animation plays on mouse enter when no ref handle is attached.
import { InformationCircleIcon } from '@/components/ui/information-circle';export default function BasicExample() { return <InformationCircleIcon />;}Custom size and color
Sets the size prop and uses Tailwind text color classes, since the SVG strokes use currentColor.
import { InformationCircleIcon } from '@/components/ui/information-circle';export default function ColorExample() { return <InformationCircleIcon size={20} className='text-sky-600 cursor-pointer' />;}Programmatic control via ref
Attaches a ref to the handle and starts the animation from a button click. Attaching the ref disables the automatic hover animation for this instance.
import { useRef } from 'react';import { InformationCircleIcon } from '@/components/ui/information-circle';import type { InformationCircleIconHandle } from '@/components/ui/information-circle';export default function RefExample() { const iconRef = useRef<InformationCircleIconHandle>(null); return ( <button type='button' onClick={() => iconRef.current?.startAnimation()} className='inline-flex items-center gap-2'> <InformationCircleIcon ref={iconRef} size={24} /> <span>Show details</span> </button> );}Info tooltip trigger
Wraps the icon in an accessible button with an aria-label, so the icon is announced correctly by screen readers.
import { InformationCircleIcon } from '@/components/ui/information-circle';export default function TooltipTriggerExample() { return ( <button type='button' aria-label='More information' className='text-muted-foreground hover:text-foreground'> <InformationCircleIcon size={18} /> </button> );}API reference
Accessibility
- The icon is decorative SVG with no title or role; when it conveys meaning, wrap it in a button or link with an aria-label or visible text.
- Animation is skipped entirely when the user has prefers-reduced-motion enabled, because startAnimation returns early when useReducedMotion is true.
- The wrapping div is not focusable; add tabIndex and keyboard handlers when the icon is an interactive trigger.
- Use currentColor-based color classes to keep sufficient 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 "information-circle" component (hugeicons-animated/information-circle) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/information-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, ...props (HTMLAttributes<HTMLDivElement>).Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { InformationCircleIcon } from '@/components/ui/information-circle';export default function Example() { return <InformationCircleIcon />;}```Files & dependencies
- icons/information-circle.tsx
- lib/use-icon-animation.ts