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
VaultButtonsCircle Fill Button
Letter Fade RevealBrowse all 182Colour Shift Sections
  • 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

Circle Fill Button

This one is free. Make an account and the code is yours, no card needed.

Create a free account

What you'll need.

Install

  • gsap

Setup

npm i gsap

More like this

  • Fill

Features.

  • A circle grows out of the exact point the mouse enters the pill
  • On leave it shrinks back into the point the mouse left, so the fill follows the pointer's path in and out
  • Sized to the pill's farthest corner every time, so it covers the whole pill in the same time from any edge
  • Keyboard focus fills from the centre and empties on blur
  • Two variants: a cobalt pill and a cobalt hairline outline, both with an amber fill that flips the label dark
  • Each move takes over from the last, so a quick in-and-out never stutters
  • Mouse only: touch and pen taps just follow the link
  • Respects prefers-reduced-motion: the fill appears and disappears at once
  • GSAP only, plain CSS for the look

How to get it right.

Pick the speed for the size

The circle always takes data-au-duration seconds (0.6 by default) whatever the pill's size. Short pills feel fine faster; wide ones read better at the default or a touch slower.

Keep the label readable on both colours

The label sits above the circle. It switches to --cfb-ink while filled. If you retheme, check the label against both --cfb-bg and --cfb-fill.

Leave the circle last

The circle span comes after the label in the markup and sits behind it through z-index. Keep it as the last child so nothing else ends up under it.

Variations.

  • Primary — the default: cobalt pill, amber fill, dark label on hover
  • Outline — data-au-variant="outline": cobalt hairline pill, amber fill, label flips dark
  • Snappy — data-au-duration="0.4" for small or dense buttons
  • Slow pour — data-au-duration="1.4" for one large hero button
  • Your colours — override --cfb-bg, --cfb-text, --cfb-fill, --cfb-ink, --cfb-border and --cfb-focus on the button

Where it fits.

  • Hero call to action — one primary pill with an outline beside it
  • Navigation actions — "Book", "Contact" or "Shop" at the end of a header
  • Cards and lists — a small outline pill per item, where the entry point makes each hover feel different
  • Forms — the submit button, with keyboard focus getting the same fill

Frequently asked.

Yes. Keep the class, the root attribute and the circle span, and add type="button" and border: 0 (the outline is drawn with a shadow, not a border).

It only reacts to a mouse. A tap on touch screens goes straight to the link, so there's no half-played fill left behind.

Set font-size on the button. The padding is in em, so the pill scales with the text.

Each [data-au-circle-fill-button] is its own instance. Add as many as you like; window.au.CircleFillButton.refresh() picks up ones added later.

No. Load gsap before the script; nothing else is needed.

Related components.

Pro

Gooey Fan Menu

Click

Pro

Arrow Swap Button

Hover

Free

Rising Fill Button

Hover