Components / component

Border Trace Button

A pill with a quiet outline. On hover a solid line traces around the border, drawing a full ring in one sweep.

Border Trace Button demo

Implementation

A pill with a quiet outline. On hover a solid line traces around the border, drawing a full ring in one sweep.

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

Loading source…

Quality evidence

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

Changelog

v1.0.0 · A pill with a quiet outline. On hover a solid line traces around the border, drawing a full ring in one sweep.

Frequently asked questions

How does the line follow the pill shape?

A conic gradient is cut down to a one pixel ring with a mask, and its sweep angle is a registered CSS property the browser animates. It works at any size.

What if a browser does not support registered properties?

It shows the finished ring on hover without the sweep. Everything else still works.