115 Components

Expanding Arrow Button

Buttons

An interactive pill button featuring a spring-expanding accent block that morphs from an idle dotted chevron into a kinetic ordered Bayer dither pattern on hover and keyboard focus.

NewButtonsDither PatternSpring PhysicsA11y Ready
/r/expanding-arrow-button.json

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:framer-motionclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/expanding-arrow-button.json"

Props

TypeScript props supported by <ExpandingArrowButton />.

8 props
PropTypeDefaultDescription
childrenrequiredReactNode—Text or elements displayed inside the button.
accentClassNamestring"bg-lime-300 text-neutral-950"Custom classes for the expanding accent block surface.
labelClassNamestring—Custom classes for the default unexpanded label text.
expandedLabelClassNamestring—Custom classes for the label text when expanded over the dither surface.
showLabelOnExpandbooleantrueWhether to render the text label over the dither pattern when expanded.
ditherClassNamestring—Custom classes for the animated dither pattern container.
stiffnessnumber420Spring physics stiffness value for the pill expansion.
dampingnumber30Spring physics damping value for the pill expansion.

Key Features

  • Smooth layout-spring expansion from a compact 52px pill to full button width.
  • Integrated ordered Bayer 4x4 dither pattern with seamless continuous animation.
  • Kinetic wave columns that pulse and oscillate across the expanded surface.
  • Smart touch handling with useHoverCapable to prevent sticky hover states on mobile.
  • Seamless keyboard focus activation with high-contrast visible focus rings.
  • Tactile press spring feedback (whileTap={{ scale: 0.97 }}).
  • Automatic compliance with prefers-reduced-motion.

Keyboard & Accessibility

  • Uses semantic HTML <button> element with full keyboard tab focus.
  • Focus triggers the same kinetic expansion as hover, ensuring parity for keyboard users.
  • Visible high-contrast focus rings with focus-visible.
  • Respects prefers-reduced-motion by substituting spring physics with instantaneous transitions.