Morphing Tabs
Tabs where the highlight pill is joined to the content panel below by a smooth curved neck that follows it as it moves. Use it for product specs, pricing details, or any section that swaps content in place.
One of 71 GSAP components in React, Vue and HTML.
On mobile
Take the free components with you.






In React, Vue and HTML, in your inbox, ready when you're back at your desk.
How it's built.
The pill and the curve flowing into the panel are not two shapes sitting next to each other - they are a single path, redrawn as the pill moves. That matters more than it sounds. Drawn separately, the pill's edge and the curve's edge meet at a tangent, and two soft-edged shapes touching at a tangent never quite cover the same pixels, so a faint seam shimmers along the join whenever it moves. One shape has nothing to shimmer.
An earlier version fused them with a blur-and-threshold filter, the usual gooey trick. It cannot line up. That kind of shape is wherever two blurred halos add up past a cutoff, so right at the joint the panel's halo pushes the outline out past the pill's real edge - the same effect that creates the connection is the one that ruins the alignment. Drawing the curve instead gives an exact edge, and costs no filter.
Two details make the shape hold up. The curve starts at the pill's widest line rather than at its bottom - below that line the pill is already narrowing, and a curve joined down there would make the edge go out, then in, then out again. And the size of the curve eases off as it runs out of room near a panel edge, rather than being cut off at a hard limit. That second part matters more than it sounds: cut it off and the radius goes from frozen to moving in a single step, which reads as a snap. Leave it too small and the curve cannot cover the distance to the panel's edge on its own, so the panel's own corner has to finish the job and the two opposite curves stack into a visible notch. Easing it off avoids both.
The label colour swap is a clipping trick. Every tab holds two copies of its own label - the normal dark one, and a light one directly on top of it inside the same button. A window then reveals the light copy only across the part of that button the pill currently covers. Because each light label lives inside its own button rather than in a separate row floating above them, the two copies cannot drift apart, and the colour flips right at the pill's moving edge.
Drop in your own tabs and panel content, set how tight or sweeping the joint is, and pick the travel ease. Keyboard works with both activation styles, and reduced motion turns the whole thing into an instant swap.
What you'll need.
Install
- GSAP
- CustomEase
- SplitText
Attributes, tips, use cases and full code are part of access.
The preview and provenance stay public. Tune-it docs, the data-anm-* attribute table, real-world use cases and the copy-ready code unlock the moment you sign in.
Frequently asked
- Does Morphing Tabs work with React and Vue?
- Morphing Tabs ships as React (Next.js included), Vue 3 (Nuxt included), plain HTML/CSS/JS - the same animation in each format. The React version uses the official useGSAP hook with cleanup handled; the Vue version is a real single-file component with <script setup>.
- Do I need GSAP to use Morphing Tabs?
- Yes. Morphing Tabs is built on GSAP directly, and GSAP has been 100% free for commercial use, including every plugin, since version 3.13. The component page lists exactly what to install.
- Can I customize Morphing Tabs without editing code?
- Morphing Tabs exposes 7 tunable controls in the Customize panel on this page - drag the values, watch the live preview respond, and the code you copy carries your exact settings.
- Is Morphing Tabs free?
- Morphing Tabs is part of the Annnimate Library, a paid subscription (from EUR 249/year). The live preview and customization run free on this page; the paste-ready code is for members.
- Can I use Morphing Tabs in client projects?
- Yes. The Annnimate license covers commercial and client work - ship Morphing Tabs on as many projects as you build, with no attribution required.
- Does Morphing Tabs respect prefers-reduced-motion?
- Yes. Every Annnimate component handles prefers-reduced-motion via gsap.matchMedia, so users who opt out of motion get an effectively instant, readable state.
