GodUI

Tab Bar

A mobile bottom navigation where a shared-element blob slides under the active tab, the icon gives a haptic-style pop, and the label reveals on selection.

Home · Your daily overview

Installation

pnpm dlx shadcn@latest add "https://godui.design/r/tab-bar.json"

Usage

tsx
 
import { TabBar } from "@/components/godui/tab-bar";
tsx
 
const [tab, setTab] = useState("home");

<TabBar tabs={tabs} value={tab} onChange={setTab} safeArea />;

Pass safeArea to add bottom safe-area padding for devices with a home indicator.

Props

PropTypeDefaultDescription
tabsTabBarTab[]{ value, label, icon, badge? }
valuestringControlled active tab
defaultValuestringfirst tabUncontrolled initial tab
labelsOnActiveOnlybooleantrueReveal the label only on the active tab
safeAreabooleanfalseAdd bottom safe-area padding
onChange(value: string) => voidCalled when the active tab changes

On this page

Built with GodUI

Beautifully crafted motion components for modern interfaces.

Star on GitHub