uibrik

Morph Tab Bar

New

Preview

Customize

Raised
Tab width64px
Duration0.50s
Lift1.12
Stretch0.50

Usage

import { MorphTabBar } from "@/components/uibrik/morph-tab-bar/morph-tab-bar";

<MorphTabBar />

Installation

npx shadcn@latest add https://uibrik.com/r/morph-tab-bar.json
Adds the files to components/uibrik/morph-tab-bar and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/morph-tab-bar.

Props

MorphTabBar
indicator
Type "raised" | "solid"
"raised"
A light pill on a tinted bar, or an inverted pill.
labels
Type boolean
false
Small label under each icon.
tabWidth
Type number
64
Width of one tab.
duration
Type number
0.5
How long the trailing edge takes to arrive.
draggable
Type boolean
true
Press and drag the pill across the tabs.
lift
Type number
1.12
How much the pill grows while held.
stretch
Type number
0.5
How far the trailing edge lags the leading one. 0 slides rigidly.
tabs
Type { label: string; icon: Icon; activeIcon?: Icon }[]
Home, Search, Inbox, Saved, Profile
Tabs in order. activeIcon is the filled glyph shown while active.
defaultValue
Type number
0
Active tab on mount (uncontrolled).
value
Type number
–
Active tab (controlled).
onChange
Type (index: number) => void
–
Called with the tab picked by click or arrow keys.
className
Type string
–
Classes for the bar.