VanillaReactLight & dark184 views
A pill-shaped button whose fill wipes in from the left edge: an overlay layer scales from scaleX(0) to scaleX(1) on hover and on keyboard focus, while the trailing icon chip inverts to the accent colour.
Get the code for free
Create a free account to copy or download the full source.
Button component
A pill-shaped button whose fill wipes in from the left edge: an overlay layer scales from scaleX(0) to scaleX(1) on hover and on keyboard focus, while the trailing icon chip inverts to the accent colour.
::before overlay filled with --bgs-hover scales from scaleX(0) to scaleX(1) with transform-origin: left center, wiping the surface colour in from the left edge (GPU-composited transform, no repaint):focus-visible reproduces the identical wipe and icon inversion as :hover, so the button never has a keyboard-only dead state--bgs-ink fill becomes --bgs-accent, glyph becomes --color-on-primarycolor-mix of --bgs-hover and --bgs-accent) and draws an inset hairline ring for tactile feedback.bg-layer::before / .bg-layer::after) drawn from --bgs-line, framing the buttonprefers-reduced-motion: reduce — all transitions and animations collapse to 0.01ms<button> carries an aria-label matching its visible text.bgs-btn__icon is marked aria-hidden="true" — the arrow adds no label text:focus-visible draws a 2px --ring outline at 2px offset:focus-visible triggers the same wipe and icon inversion as :hover, so keyboard users see the same affordanceevent.detail > 0); Enter/Space keep focus on the buttonprefers-reduced-motion: reduce collapses all transitions to 0.01msOpen Gradient Sweep Button in Atheros AI Builder, pick a design system and ask the AI assistant to change the layout, copy or behaviour — the button is regenerated against your tokens. Take the HTML, CSS, JS and React source with you, or pull it into your repo from Claude Code, Cursor or Codex over MCP.
300+ production-ready components and Atheros AI models. Every paid plan includes access to the whole Atheros — AI Builder and Learning.
Starting at $9.9 per month, billed annually