Components / component

Underline Sweep Button

v1.0.0 · premium

A text button whose underline sweeps out to the right and back in from the left on hover, with an arrow that nudges forward.

Underline Sweep Button demo

Implementation

A text button whose underline sweeps out to the right and back in from the left on hover, with an arrow that nudges forward.

Framework
React 19.3.1 with TypeScript
Motion
Native CSS and browser APIs. No GSAP required.
Available modes
build
Version
1.0.0 · published

Source code

Download source ZIP
export function UnderlineSweepButton({ children, href, onClick, type = 'button', size = 'md', arrow = false, disabled = 
  children: string;
  href?: string;

Quality evidence

Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .

Changelog

v1.0.0 · A text button whose underline sweeps out to the right and back in from the left on hover, with an arrow that nudges forward.

Frequently asked questions

When should I use a text button instead of a pill?

Use it for secondary actions and inline links where a filled shape would be too heavy, such as Read the case study next to a primary action.

Does the underline animate on touch?

No. Hover only plays on devices that can hover. Keyboard focus plays the same sweep.