Swap Pill
A small dot grows until it fills the pill, a clear hover or selected state.
Meant for
Usage
On a Button
Hover it. Two labels in one slot: mark them data-wm-from and data-wm-to. The old label leaves in 150 ms, the dot opens into the fill as a clip-path circle (its edge stays sharp, unlike a tiny dot scaled 34×) and the new label arrives in 250 ms. Both labels are taken out of the flow, so the button needs a width. The slot itself is a grid, so wrap a label-plus-icon in one inline-flex span or the icon drops onto a second line.
The class is wm wm-swap-pill — the first half is the marker the trigger and reduced-motion rules hook into, the second is the effect.