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
VaultButtonsJelly Button
Inline Image HeadingBrowse all 182Label Pill Cursor
  • 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

Jelly 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
  • CustomEase

Setup

npm i gsapregisterPlugin(CustomEase)

More like this

  • Elastic

Features.

  • Press squashes the pill down onto its bottom edge and out to the sides
  • Release springs it up past rest, then it wobbles to a stop on an elastic settle
  • The width always trails the height by a beat, which is what makes it read as jelly
  • Moving the pointer in or out dents the edge it crossed: top or bottom flattens it, a side pinches it tall
  • Faster pointer moves dent harder; leaving dents half as hard as entering
  • The label undoes 60% of the distortion, so the text stays readable
  • Space and Enter press and release it from the keyboard
  • Three knobs: squash, stretch and wobble
  • Respects prefers-reduced-motion: a plain 0.96 press and release, no dents
  • GSAP and CustomEase

How to get it right.

Give it room above

It squashes onto its bottom edge and stretches upwards on release. Leave space above the button so the overshoot isn't clipped by a parent with overflow: hidden.

Turn one knob at a time

squash sets the press, stretch the bounce back, wobble how long it rings. The defaults sit in the middle. Raising all three at once turns it into a toy; for a product UI drop wobble to 0.2 first.

Keep the label short

The label is counter-scaled, so long labels shift slightly as the pill changes shape. Two or three words read best.

Variations.

  • Default — squash 0.55, stretch 0.5, wobble 0.5
  • Firm — data-au-squash="0.3" data-au-stretch="0.2" data-au-wobble="0.1": a subtle press for forms
  • Bouncy — data-au-squash="0.9" data-au-stretch="1" data-au-wobble="1": for playful pages
  • No overshoot — data-au-stretch="0": it settles straight back from the squash
  • Your colours — override --jlb-bg, --jlb-text and --jlb-focus on the button

Where it fits.

  • Playful brands — games, kids' products, food and drink
  • Add to cart / like — any button whose press should feel physical
  • Onboarding — "Let's go" at the end of a welcome screen
  • Empty states — a single call to action with nothing competing for attention

Frequently asked.

Yes. It's a normal <button>; the script only animates it. Attach your own click handler as usual.

Pokes are skipped for touch pointers, because a tap has no in-and-out movement. Press and release still squash and spring.

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

Each [data-au-jelly-button] is its own instance. window.au.JellyButton.refresh() picks up ones added later.

Related components.

Pro

Gooey Fan Menu

Click

Pro

Arrow Swap Button

Hover

Free

Rising Fill Button

Hover