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
VaultUI componentsPill to Panel Tabs
Line FAQ AccordionBrowse all 182Sliding Notch Cards
  • 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

Pill to Panel Tabs

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

  • gsap
  • SplitText
  • CustomEase

Setup

npm i gsapregisterPlugin(SplitText, CustomEase)

More like this

  • Tabs
  • Split text
  • SVG
  • Morph

Features.

  • The active tab's pill and a curved neck into the panel are drawn as one shape, so there's no seam while it moves
  • Pick a tab and the pill glides there; the neck flows with it and shrinks smoothly as it nears the panel's edge
  • Labels light up exactly where the pill covers them, so the lit edge travels with the pill
  • The panel's top corners round off as the neck moves away from them
  • The panel resizes to the new content, which fades in with its lines rising from masks, its image settling from a zoom and any spec line lifting in
  • Quick clicks never strand old content: each switch takes over from the last
  • A real tablist: arrow keys (wrapping), Home and End
  • Phones (767px and below): smaller tabs, and the image goes full width above the text
  • Respects prefers-reduced-motion: every switch is instant
  • GSAP, SplitText and CustomEase

How to get it right.

Three to five short tabs

The tabs sit in one row, flush with the panel's edges. Short labels keep the row inside the 40em panel, especially on phones.

Let the panel change height

Part of the effect is the panel growing or shrinking to fit. Give the items different amounts of text and the move reads as intentional.

Keep the neck in proportion

22px suits the default tab size. A bigger radius needs more space between the tabs and the panel; the script caps it at what fits, so it never overshoots.

Pick an ink the text can sit on

The pill, neck and panel are all --mtb-ink. The lit label and the panel text have to read on it.

Variations.

  • Default — 0.7s switch, 22px neck
  • Sharp neck — data-au-radius="0": the pill drops straight into the panel
  • Soft neck — data-au-radius="34" for a rounder join
  • Slow glide — data-au-duration="1.1"
  • Your colours — override --mtb-ink, --mtb-lit, --mtb-muted, --mtb-body and --mtb-focus on .mtb_tabs

Where it fits.

  • Services — one tab per service with a picture and a line, like this demo
  • Product details — materials, sizing, care
  • Pricing extras — what's in each plan
  • Case study sections — brief, process, result

Frequently asked.

So the neck can run straight down at the first and last tab. The curve shrinks to nothing at an edge rather than snapping.

Yes. It ships without one. Add <p class="mtb_spec" data-mtb-spec> with .mtb_spec-key and .mtb_spec-value spans under the text, or pass spec in React. It lifts in with the text.

Yes. An item without an image just skips the zoom. Keep data-mtb-text for the rising lines.

Override max-width on .mtb_tabs, or set font-size to scale everything.

The first item shows under plain tabs; there's no pill or panel colour.

No. Load gsap, SplitText and CustomEase before the script.

Related components.

Pro

Image Slide Tabs

Click

Pro

Glow Band Sheet Modal

Click

Pro

Expanding Card Modal

Click