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
VaultButtonsRising Fill Button
Shape Mask RevealBrowse all 182Split Headline Reveal
  • 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

Rising 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 fill rises from below on hover, growing from half size to full as it travels
  • On leave it drops back out the bottom, or with data-au-exit="top" carries on up and out
  • The fill takes the button's own corner radius: pill, rounded or square
  • The button presses in to 0.95 while filled and the label swaps to the ink colour
  • Quick in-and-out never jumps: the bottom exit reverses from wherever the fill is
  • Keyboard focus fills it too; leaving with the mouse keeps the fill while it still has focus
  • Two variants: a pink button and a pink hairline outline, both with a butter fill
  • Respects prefers-reduced-motion: the fill switches instantly, no press
  • GSAP only, plain CSS for the look

How to get it right.

Pick the exit for the job

The bottom exit reads as "back to rest", good for buttons people hover past. The top exit reads as "through and done", good for a single call to action you want to feel like a wipe.

Keep the ink readable on the fill

The label sits on --sfb-fill once it's covered. If you change one, check --sfb-ink against it.

Match the shape to the page

The shape option is styling only: set it to whatever your other buttons use and the fill follows.

Variations.

  • Solid pill — the default
  • Outline — data-au-variant="outline": a pink hairline ring that floods butter, the label turning dark
  • Rounded or square — data-au-shape="rounded" or "square"
  • Top exit — data-au-exit="top": the fill passes through instead of dropping back
  • Your colours — override --sfb-bg, --sfb-text, --sfb-fill, --sfb-ink, --sfb-border and --sfb-focus

Where it fits.

  • Calls to action — hero, pricing, footer
  • Button sets — a primary next to an outline secondary
  • Forms — submit buttons that want a little feedback
  • Navigation — a "Contact" or "Book" link in a header

Frequently asked.

Yes. Keep the class, the root attribute and the fill span; add type="button" and border: 0.

It reacts to a mouse and to keyboard focus only. On touch a tap just follows the link, so there's no half-played fill left behind.

Set font-size on the button. Padding and the rounded radius are in em.

Each [data-au-slide-fill-button] is its own instance. window.au.SlideFillButton.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

Circle Fill Button

Hover