Toggle Sidebar B
AppearanceLight & dark mode D

Glow Button

Pill button with a spring-tracked light inside and mirrored edge glows that crossfade as the pointer changes sides. Vue port of MicroKit UI's Cursor Edge Glow Button.

Default

Move the pointer across the button. The light follows on a spring and the edge on the pointer's side lights up, then both stay where the pointer left.

Dark previewReplay preview

Sizes

sm, default and lg. The glow keeps the same spread at every size.

Dark previewReplay preview

Colors

colorVariant picks a hand-tuned palette: ember, the original, or cyan. For any other color pass color for the glow and highlight for the inner light, and every other stop is derived from those two.

Dark previewReplay preview

Theme

The surface adapts to the page. auto follows the nearest dark class, light and dark pin it for a background that never changes.

Dark previewReplay preview
theme="light"
theme="dark"
theme="auto"

Secondary

variant="secondary" drops the glow and keeps the height, padding, radius and type, so a second action sits level with the first.

Dark previewReplay preview

Spring

frequency sets how fast the light catches the pointer and damping how far it overshoots. Below 1 it bounces, 1 and above it settles.

Dark previewReplay preview

Playground

Every knob on one panel. The snippet under the preview lists only what differs from the defaults.

Dark previewReplay preview
Color
Size
Theme
Frequency3.4
Damping0.78
Glow rise0.5
Edge saturation0.55
Edge brightness0.12
Hue shift-5
<GlowButton>See in action</GlowButton>

API Reference

GlowButton

PropTypeDefaultDescription
variant"default" | "secondary""default"default carries the glow. secondary is a plain translucent pill with the same geometry.
size"sm" | "default" | "lg""default"Height 32, 40 or 48px, with padding to match.
theme"auto" | "light" | "dark""auto"Surface palette. auto follows the nearest dark class; light and dark pin it.
colorVariant"ember" | "cyan""ember"Hand-tuned palette. color and highlight override it.
colorstringGlow color, any CSS color. Overrides colorVariant.
highlightstringInner light and rim tint. Derived from color when unset.
arrowbooleantrueTrailing arrow after the label.
frequencynumber3.4Spring frequency in Hz. Higher catches the pointer faster.
dampingnumber0.78Damping ratio. Below 1 overshoots, 1 and above settles without bouncing.
glowRisenumber0.5Exponent on the edge opacity. Lower values light the edge sooner.
edgeSaturationnumber0.55Extra saturation on the lit edge at full travel.
edgeBrightnessnumber0.12Extra brightness on the lit edge at full travel.
hueShiftnumber-5Hue rotation on both edges, in degrees.
tostringRenders a NuxtLink. External URLs get target _blank and rel noopener.
targetstringLink target. Overrides the external default.
asstring"button"Element to render when to is empty.
disabledbooleanfalseDisables the button, or marks the link aria-disabled.
SlotDescription
defaultThe label. The arrow follows it when arrow is on.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • Renders a native button, or a link when to is set, so Enter and Space behave as usual.
  • The edges, the surface and the light are aria-hidden with pointer-events none. Only the label is read and clicked.
  • Keyboard focus pulls the light to the centre, and the focus outline sits 8px out so it clears the glow.
  • With prefers-reduced-motion: reduce the light stays parked on the right edge and the spring never runs.