Skip to content
Knsept
Free playbook

Glowing gradient border

A button with a rotating gradient border and soft glow, done with one registered CSS property and no extra elements.

CSSUI Widgets Updated Oct 23, 2026
Live demo Reduced motion is on, so effects are toned down
<button class="glow-button" type="button">Get started</button>

The border is a background, not a border color. The button has two backgrounds: a solid fill clipped to the padding-box, and a conic gradient clipped to the border-box. Since the border itself is transparent, the gradient only shows through the 2px border ring.

The rotation comes from @property. Registering --angle as an <angle> lets the browser interpolate it from 0deg to 360deg, which an ordinary custom property can't do. The glow is the same gradient on a blurred ::before behind the button, and it brightens on hover and focus.

With reduced motion on, the gradient rotates four times slower. Browsers without @property support show a static gradient border, which still looks fine.

More from the library

Buttons live

Hold-to-confirm button

A safer button for destructive actions. Press and hold until the bar fills; let go early to cancel.

Buttons live

Ripple button

A bright press ripple that starts exactly where you click or tap, and from the center for keyboard users.

Buttons live

Magnetic button

A button that leans toward the cursor and springs back. Press-and-drag on touch, gentler with reduced motion.