chevron-double-down

An animated double-chevron-down icon for React that bounces its two stacked chevrons downward on hover. It can run on its own hover or be driven programmatically through a ref.

chevron-double-down
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 @heroicons-animated/chevron-double-down

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

Usage

usage.tsx
import { ChevronDoubleDownIcon } from "@/components/ui/chevron-double-down";export default function Demo() {  return <ChevronDoubleDownIcon className="text-neutral-700" size={28} />;}
  • Scroll-down or 'show more' affordances, such as hero section 'scroll for more' links or expandable sections
  • Hover-reactive buttons or links where a subtle downward motion signals that content will expand or reveal below
  • Accordion or disclosure headers that need a directional cue for expanding downward
  • Programmatic animation of the icon in response to app state, using the exposed startAnimation and stopAnimation ref methods

Examples

Hover-animated icon

Renders the icon with a custom color and size. It animates automatically when the pointer enters and leaves the icon wrapper.

hover-animated-icon.tsx
import { ChevronDoubleDownIcon } from "@/components/ui/chevron-double-down";export default function HoverDemo() {  return <ChevronDoubleDownIcon className="text-blue-600" size={32} />;}

Ref-controlled animation on a button

Uses the ref handle so hovering the parent button starts the animation. Because the icon is controlled, its own mouse handlers no longer animate it.

ref-controlled-animation-on-a-button.tsx
import { useRef } from "react";import { ChevronDoubleDownIcon, type ChevronDoubleDownIconHandle } from "@/components/ui/chevron-double-down";export default function ControlledButtonDemo() {  const iconRef = useRef<ChevronDoubleDownIconHandle>(null);  return (    <button      type="button"      onMouseEnter={() => iconRef.current?.startAnimation()}      onMouseLeave={() => iconRef.current?.stopAnimation()}      className="inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm"    >      Scroll down      <ChevronDoubleDownIcon ref={iconRef} size={20} />    </button>  );}

Scroll-down link

A small anchor that labels a section and shows the icon beneath it as a scroll cue.

scroll-down-link.tsx
import { ChevronDoubleDownIcon } from "@/components/ui/chevron-double-down";export default function ScrollCue() {  return (    <a href="#features" className="flex flex-col items-center gap-1 text-sm text-neutral-500">      <span>More</span>      <ChevronDoubleDownIcon size={24} />    </a>  );}

API reference

PropTypeDefaultDescription
sizenumber28Width and height of the rendered SVG in pixels. Applied to both the svg width and height attributes.
classNamestring—Class names applied to the outer div wrapper, not to the svg. Use it for color (text-*) or margins.
onMouseEnter(e: React.MouseEvent<HTMLDivElement>) => void—Called on pointer enter. When the ref is attached, this callback replaces the built-in hover animation, so the component no longer plays the animation on hover.
onMouseLeave(e: React.MouseEvent<HTMLDivElement>) => void—Called on pointer leave. When the ref is attached, this callback replaces the built-in hover reset animation.
refReact.Ref<ChevronDoubleDownIconHandle>—Exposes startAnimation() which plays the bounce and stopAnimation() which returns the icon to its resting position. Attaching the ref switches the component into controlled mode.
...HTMLAttributes<HTMLDivElement>HTMLAttributes<HTMLDivElement>—All other standard div attributes (id, style, aria-*, data-*, onClick, etc.) are forwarded to the outer wrapper div.

Accessibility

  • The rendered SVG has no title, desc, or role, so it is treated as decorative. If the icon conveys meaning on its own, wrap it or add aria-label and role="img" on the wrapper via the forwarded div props.
  • When the icon sits inside a button or link, the accessible name must come from visible text or aria-label on the interactive element; the icon itself should not be the only label.
  • The animation is a short 0.5-second translate and does not blink or flash, but users who prefer reduced motion may want to disable the hover animation by controlling it through the ref and skipping startAnimation.
  • Hover-only animation gives no feedback to keyboard or touch users. Pair it with a visible focus style on the interactive parent, or trigger startAnimation from focus events through the ref.

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 "chevron-double-down" component (heroicons-animated/chevron-double-down) from its shadcn registry.1. Install it with: npx shadcn@latest add @heroicons-animated/chevron-double-down2. 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 { ChevronDoubleDownIcon } from "@/components/ui/chevron-double-down";export default function Demo() {  return <ChevronDoubleDownIcon className="text-neutral-700" size={28} />;}```

Files & dependencies

  • chevron-double-down.tsx
dependenciesmotion

Looks similar, elsewhere