Skip to content

No.39 · Buttons

Follow Toggle

A follow button that changes its mind honestly: Follow becomes Following with a check, the pill narrows to fit, and hovering a followed state quietly offers Unfollow.

The prompt

The design brief behind this component — reuse it to regenerate, remix, or explain it.

Build a follow button with three labels in one pill — Follow (bone fill, + icon), Following (transparent with a hairline ring and a check that draws itself) and Unfollow (rose tint and ring, shown only when hovering a followed state, so the consequence is previewed before the click). All three labels are stacked in one grid cell and cross over with a 40% rise and a 3px blur resolving; the pill's width animates to the visible label's measured width (hidden copies, re-measured after fonts load) over 460ms expo-out. Following a person releases a faint ring that bursts outward from the pill and fades. Press compresses to 0.96. The accessible label says who you follow and what pressing will do; aria-pressed reflects state.

Notes

Interaction
Click to follow; hover while following to see Unfollow; click again to unfollow.
Motion
Width 460ms; labels cross with blur and lift (260–420ms); check draw 420ms; follow burst 700ms.
Accessibility
A toggle button with aria-pressed and a descriptive label; hidden label copies are aria-hidden. Reduced motion makes changes instant.
Responsive
Intrinsic width that follows the label.
On touch
On touch there's no hover preview; tapping a followed state unfollows directly.

Featured

301 components