Morph Tabs

New

Tabs whose highlight stretches across like elastic

$ npx @hritik-sharmaa/repeat-ui add commons-morph-tabs
Category
Commons
Added
Nov 1, 2026
Version
1.0.0
Packages
motion
Flavors
TS · JS · Tailwind · CSS
Live preview
Customize
0.12s
import CommonsMorphTabs from "@/components/repeat-ui/commons-morph-tabs/preview";

<CommonsMorphTabs />

Installation

  1. Run the command

    Adds the files and installs any packages they need. Works with npm, pnpm, yarn and bun.

    $ npx @hritik-sharmaa/repeat-ui add commons-morph-tabs --variant ts-tailwind
  2. Use it

    The files are in components/repeat-ui/commons-morph-tabs/.

    import CommonsMorphTabs from "@/components/repeat-ui/commons-morph-tabs/preview";
    
    export default function Page() {
      return <CommonsMorphTabs />;
    }

Props

PropTypeDefaultDescription
tabsstring[]["Overview", "Components", "Pricing", "Docs"]Tab labels.
defaultIndexnumber0The tab selected at first.
onChange(index: number) => void-Called with the selected tab's index.
accentColorstring"#fa5f1b"Highlight colour.
backgroundstring"#171717"Bar background.
textColorstring"#a3a3a3"Tab text colour.
activeTextColorstring"#ffffff"Selected tab's text colour.
stretchnumber0.12Seconds the trailing edge waits; higher stretches more.
classNamestring""Extra classes for the root element.

More commons

See all