settings-01

settings-01 is an animated settings (gear) icon built with motion/react. On hover it spins the outer gear teeth through a short spring-eased rotation while the center circle stays fixed, and it can also be triggered programmatically through a ref.

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

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

Usage

usage.tsx
import { Settings01Icon } from '@/components/icons/settings-01';export function Example() {  return <Settings01Icon size={24} />;}
  • Settings, preferences, or configuration buttons in toolbars, sidebars, or headers where a playful hover cue is wanted
  • Menu items or nav links that should signal interactivity through a brief gear-turning motion
  • Controlled animation scenarios where a parent triggers the gear turn on a save, submit, or click action via a ref
  • Dashboards or app shells that need a consistent, lightweight animated icon set following the shadcn/ui registry pattern

Examples

Icon button in a header

Places the animated gear inside an accessible icon-only button. The icon animates on hover through its built-in mouse handlers.

icon-button-in-a-header.tsx
import { Settings01Icon } from '@/components/icons/settings-01';export function HeaderSettingsButton() {  return (    <button      type="button"      aria-label="Open settings"      className="inline-flex items-center justify-center rounded-md p-2 hover:bg-accent"    >      <Settings01Icon size={20} />    </button>  );}

Controlled animation via ref

Attaches a ref to trigger the gear turn programmatically. When a ref is attached, hover no longer auto-starts the animation, so the parent decides when it plays.

controlled-animation-via-ref.tsx
import { useRef } from 'react';import { Settings01Icon, type Settings01IconHandle } from '@/components/icons/settings-01';export function SaveSettingsButton() {  const iconRef = useRef<Settings01IconHandle>(null);  return (    <button      type="button"      className="inline-flex items-center gap-2 rounded-md border px-3 py-2"      onClick={() => iconRef.current?.startAnimation()}    >      <Settings01Icon ref={iconRef} size={18} />      Save settings    </button>  );}

Nav link with tinted icon and hover callback

Uses className to color the icon through currentColor and onMouseEnter, which is forwarded to the wrapper div and called before the built-in animation logic.

nav-link-with-tinted-icon-and-hover-callback.tsx
import { Settings01Icon } from '@/components/icons/settings-01';export function SettingsNavLink() {  return (    <a href="/settings" className="flex items-center gap-3 text-sm">      <Settings01Icon        size={24}        className="text-muted-foreground"        onMouseEnter={() => console.log('settings hovered')}      />      Settings    </a>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels.
classNamestring—Class name applied to the outer wrapper div. The stroke uses currentColor, so text color classes control the icon color.
onMouseEnterMouseEventHandler<HTMLDivElement>—Called on mouse enter before the built-in start-animation logic runs.
onMouseLeaveMouseEventHandler<HTMLDivElement>—Called on mouse leave before the built-in stop-animation logic runs. Has no visible effect because loops is false for this icon.
refRef<Settings01IconHandle>—Forwarded ref exposing startAnimation() and stopAnimation(). Attaching a ref switches the icon to controlled mode, which disables hover-triggered animation.
...props (HTMLAttributes<HTMLDivElement>)HTMLAttributes<HTMLDivElement>—All other standard div attributes (id, style, aria-*, data-*, etc.) are spread onto the outer wrapper div.

Accessibility

  • The SVG has no title, role, or aria-label, so it is treated as decorative. When the icon is the only content of a control, put aria-label on the button or link (for example aria-label="Open settings").
  • Do not rely on the icon alone to convey meaning. Pair it with visible text or an accessible name where the context is not obvious.
  • The animation respects the user's reduced-motion preference: the hook reads useReducedMotion() and skips starting the animation when it is enabled.
  • Animation is hover-driven by default and therefore not available on touch devices; use the ref API or a visible text label so keyboard and touch users get the same information.
  • The wrapper div is a generic element with no role. Attach interactive semantics (button, a) to a parent element rather than to the icon itself.
  • Keep the animation short; it is a single turn with no looping, so it does not create persistent motion.

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

Files & dependencies

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

Looks similar, elsewhere