Bottom Bar

A mobile tab bar where the active icon hops into a bubble.

no dependenciesMIT · free

Installation

npx shadcn@latest add https://ombakui.com/r/bottom-bar.json

Usage

import { BottomBar } from "@/components/bottom-bar";

<div className="fixed inset-x-4 bottom-4 md:hidden">
  <BottomBar items={[{ label: "Home", icon: <HomeIcon /> }, { label: "Search", icon: <SearchIcon /> }]} onChange={go} />
</div>

Props

PropTypeDefaultDescription
items*BottomBarItem[]–The tabs.
valuenumber–Active index (controlled).
defaultValuenumber0Active index when uncontrolled.
onChange(index: number) => void–Called with the tapped index.
classNamestring–