Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultButtonsGlow Border Button
Unfolding LettersBrowse all 182Hide on Scroll Header
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Glow Border Button

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

    Setup

    npm i gsap

    More like this

    • Glow
    • Gradient
    • Infinite loop

    Features.

    • A 1px border made of a pink, amber and mint gradient that slides round the pill forever
    • The border is strongest along the bottom edge and fades out towards the top
    • A blurred glow of the same colours sits under the bottom edge
    • Hover or keyboard focus spreads the glow wider, lower and brighter over 0.6s
    • Pure CSS: no script, no dependencies, nothing to boot
    • One variable sets the speed: --glb-time
    • Three colour variables build the band, so it rethemes in one place
    • Respects prefers-reduced-motion: the band stops sliding, the hover glow switches without easing

    How to get it right.

    Give it a dark surround

    The glow is light on dark. On a pale page it turns into a smudge; keep the button on a dark section, or set --glb-fill to your section colour so the pill blends in and only the border reads.

    Keep the band seamless

    The band runs --glb-a, --glb-b, --glb-c, --glb-b, --glb-a, so it loops without a seam. Colours near each other on the wheel give a calm shimmer; far-apart colours make it busy.

    Leave room underneath

    The glow sits below the pill and grows to 30% of its height under it on hover. Don't put the button flush against the bottom of an overflow: hidden box or the glow is cut off.

    Variations.

    • Default — a violet pill with pink, amber and mint sliding every 2s
    • Slow — --glb-time: 5s for a calm, ambient border
    • Quick — --glb-time: 1s for a livelier hover target
    • Cool — --glb-a: #2f55e6; --glb-b: #8fbcf7; --glb-c: #bff0e4;
    • Mono — set all three to one colour for a steady glow with no visible slide

    Where it fits.

    • Hero call to action — one glowing pill under the headline
    • Launch or waitlist pages — "Join the list" where the glow says something is coming
    • Dark pricing cards — the plan you want picked
    • Footer — a single "Get in touch" at the end of a dark page

    Frequently asked.

    No. The code.js file is empty on purpose. Copy code.css and the markup and it works.

    Yes. Keep the class and the label span. The button keeps its own border of 1px solid transparent, which the gradient shows through, so don't set border yourself.

    Set font-size on the button. Padding and blur are in em, so they scale with it.

    The band is drawn on the border box behind a solid fill clipped to the padding box. Setting background on the button replaces all three layers; set --glb-fill instead.

    Related components.

    Pro

    Gooey Fan Menu

    Click

    Pro

    Arrow Swap Button

    Hover

    Free

    Rising Fill Button

    Hover