Componentnavigation0.81 KB gzipZero dependencies
TabBar
Fixed bottom navigation bar with sliding active indicator pill and badge support
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add tabbarOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { TabBar } from "@/components/ui/tabbar" <TabBar items={items} value={value} onValueChange={handleChange} />Source code
tabbar.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxtabbar.tsx96 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface TabBarProps { items: { id: string; label: string; icon?: string; badge?: number }[]; value?: string; defaultValue?: string; onValueChange?: (value: string) => void; className?: string;} export function TabBar({ items = [], value, defaultValue, onValueChange,Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { TabBar } from "@/components/ui/tabbar"; <TabBar />| Prop | Type | Description |
|---|---|---|
| items | { id: string; label: string; icon?: string; badge?: number }[] | Structured list of items rendered by the component. (Default: []) |
| value | string | Controlled value. |
| defaultValue | string | Initial value when uncontrolled. |
| onValueChange | (value: string) => void | Callback invoked on value change. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |