Skip to content
Onycx-ui
ESC

Expanding Arrow Button

A pill button that makes room for an arrow on hover or keyboard focus.

Dependencies
No extra packages
Size
115 lines
Controls
5 controls

Installation

CLI · shadcn registry

npx shadcn@latest add https://ui.onycx.dev/r/expanding-arrow-button.json

1 · Dependencies

None beyond React and Tailwind.

2 · Copy the source

components/onycx/expanding-arrow-button.tsx

Requires React 19 and Tailwind CSS v4. Copy the source from the expanding-arrow-button.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.

Props

PropTypeDefaultDescription
labelstring"Explore the Collection"Visible text. children override it.
hrefstring—Renders an anchor when provided.
background / hoverBackgroundstring"#f7f3ed" / "#f4c430"Resting and active fills; the active fill is also the focus ring.
colorstring"#0c0a09"Label and arrow colour.
size"sm" | "md" | "lg""md"md is the original px-12 py-6 text-lg (pr-20 open); sm and lg scale the same proportions.
onClick / type / disabled / target-—Forwarded to the element.