sort-by-down-01
An animated sort-by-down icon from the hugeicons-animated registry. On hover, its downward arrow dips and bounces while the two stacked value boxes scale and shift in sequence, then the icon settles back to rest.
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 { SortByDown01Icon } from '@/components/icons/sort-by-down-01';export function Example() { return <SortByDown01Icon size={24} className='text-foreground' />;}- Show a sort direction toggle (descending) in table headers, filter bars, or list toolbars where a hover micro-interaction adds feedback.
- Add a lively affordance to a button or menu item that triggers a descending sort, paired with a text label.
- Use it as a controlled animated icon where a parent component calls startAnimation through a ref, for example after a sort is applied.
- Avoid it where continuous motion or looping animation is needed, since this component plays one cycle per hover.
Examples
Sortable table header button
A column header button that shows the descending sort icon next to its label, with the icon tinted by the muted text color.
import { SortByDown01Icon } from '@/components/icons/sort-by-down-01';export function SortableHeader({ label }: { label: string }) { return ( <button type='button' className='inline-flex items-center gap-1 text-sm font-medium text-muted-foreground hover:text-foreground'> {label} <SortByDown01Icon size={16} /> </button> );}Programmatic animation via ref
Uses the exported handle type to trigger the animation from code, for example when a sort order is applied. Mouse-driven animation is bypassed while a ref is attached.
import { useRef } from 'react';import { SortByDown01Icon } from '@/components/icons/sort-by-down-01';import type { SortByDown01IconHandle } from '@/components/icons/sort-by-down-01';export function SortAppliedIndicator() { const iconRef = useRef<SortByDown01IconHandle>(null); return ( <div> <SortByDown01Icon ref={iconRef} size={28} /> <button type='button' onClick={() => iconRef.current?.startAnimation()}> Apply sort </button> </div> );}Menu item with hover callbacks
Passes onMouseEnter and onMouseLeave through to the wrapping div, which the component calls before its own animation logic.
import { SortByDown01Icon } from '@/components/icons/sort-by-down-01';export function SortMenuItem() { return ( <div role='menuitem' tabIndex={0} className='flex items-center gap-2 rounded-md px-2 py-1.5'> <SortByDown01Icon size={20} onMouseEnter={() => console.log('enter')} onMouseLeave={() => console.log('leave')} /> <span>Sort descending</span> </div> );}API reference
Accessibility
- The icon is decorative by default and has no role or label. When it conveys meaning, add aria-label or aria-hidden to the wrapper, for example aria-label='Sort descending' with role='img'.
- When the icon sits inside a button or link, the accessible name should come from visible text or an aria-label on the interactive element, not from the icon.
- The animation respects the user's prefers-reduced-motion setting through useReducedMotion, so no motion plays for those users.
- Hover-only animation gives no feedback to keyboard or touch users. Make sure the sort state is conveyed through text, aria-sort, or a visible label.
- Icon color comes from currentColor, so ensure the icon's contrast against its background meets WCAG 3:1 for non-text graphics.
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 "sort-by-down-01" component (hugeicons-animated/sort-by-down-01) from its shadcn registry.1. Install it with: npx shadcn@latest add @hugeicons-animated/sort-by-down-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 { SortByDown01Icon } from '@/components/icons/sort-by-down-01';export function Example() { return <SortByDown01Icon size={24} className='text-foreground' />;}```Files & dependencies
- icons/sort-by-down-01.tsx
- lib/use-icon-animation.ts