Bottom Tab Bar React component for Tailwind CSS v4
v1.0.0Added in 1.0.0
A React bottom tab bar for phones: 3 to 5 tabs at the thumb with an animated pill, badges, a raised center action and hide on scroll.
Tap a tab and the pill glides to it on a quick spring while the icon pops and swaps to its filled version; the icon dips while your finger is down. Tap the tab you are already on to scroll its page back to the top, or, on a nested page, to go back to the tab's first screen. The raised center button presses like a button and runs its action. Counts and dots sit on the icons and bounce in when they change. With hideOnScroll the bar follows your finger down out of view and comes back as soon as you scroll up or reach the end. On a keyboard Tab reaches every tab, ArrowLeft / ArrowRight move between them, Home / End jump to the first and last, Enter opens; the bar never hides while keyboard focus is inside it. On a phone it clears the home indicator (safe area) and every tab is far bigger than 44px. Under reduced motion the pill jumps and nothing pops.
Bottom Tab Bar is a Pro React component in the React mobile components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add bottom-tab-bar, together with Badge, useControllableState, useScrollState, Motion presets, Navigation and 2 more and the npm package motion.
Add to a project
Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup
npx wingo-ui@latest add bottom-tab-barBottom Tab Bar is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans
Usage
Import BottomTabBar from @/components/ui/bottom-tab-bar.
"use client"
import { House, Inbox, Plus, UserRound, Users } from "lucide-react"
import { BottomTabBar, type BottomTabBarItem } from "@/components/ui/bottom-tab-bar"
const tabs: BottomTabBarItem[] = [
{ label: "Home", href: "/", icon: <House />, activeIcon: <House className="fill-current" /> },
{ label: "Clients", href: "/clients", icon: <Users />, activeIcon: <Users className="fill-current" /> },
{ label: "Inbox", href: "/inbox", icon: <Inbox />, badge: 4 },
{ label: "Profile", href: "/profile", icon: <UserRound />, activeIcon: <UserRound className="fill-current" /> },
]
export function MobileNav({ onCreate }: { onCreate: () => void }) {
return (
<BottomTabBar
className="md:hidden"
items={tabs}
action={{ label: "Add", icon: <Plus />, onSelect: onCreate }}
hideOnScroll
/>
)
}Props
items*BottomTabBarItem[]3 to 5 tabs (a dev warning above 5). The shared NavItem shape: id, label, href, icon, activeIcon (shown while active, e.g. a filled glyph), badge (a number is a count, a node renders as is), disabled, match, onSelect; plus dot: true for an 8px dot instead of a count. Items without href are buttons.
valuestringThe active tab's key (navItemKey: id, else href, else the label). Controls the bar.
defaultValuestringThe first active tab while uncontrolled and no current path is known. Default: the first enabled tab.
onValueChange(key: string, item: BottomTabBarItem) => voidFires whenever another tab is activated, in every mode (controlled, router, uncontrolled).
currentPathdefault""stringThe current pathname. Empty: the LinkProvider's. With a path the router decides the active tab (the longest matching href) and clicks store nothing. Try /inbox or /clients/northwind-tech.
action{ label: string; icon: ReactNode; onSelect?: () => void; href?: string }The raised center button (Add, Compose, Scan), placed in the middle of the tabs (with 4 tabs: 2, action, 2). label becomes its aria-label; filled with the tone.
variantdefault"bar""bar" | "floating"bar: full width on the bottom edge with a glass surface and a hairline (iOS). floating: an inset glass pill above the safe area (iOS 26), the pill indicator behind the whole tab.
indicatordefault"pill""pill" | "line" | "dot" | "none"pill: a 56x32 tinted pill behind the icon (Material 3). line: a 2px bar on the top edge of the tab. dot: a 4px dot under the label. none: color only. Every one moves between tabs on a snappy spring.
showLabelsdefault"always""always" | "active" | "never"active: only the active tab shows its label and the others center their icon. never: icons only; the labels stay for screen readers and as tooltips.
sizedefault"md""sm" | "md"Bar height 56 / 64px, icons 22 / 24px, labels 10 / 11px. Both stay far above 44px targets.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The active color (neutral: the foreground, with a gray pill) and the fill of the center action. Other tones tint the pill and the active label.
colordefault""stringAny CSS color. Replaces the tone for the active tab and the action. Leave empty to use the tone.
badgeTonedefault"danger""neutral" | "brand" | "success" | "warning" | "danger" | "info"The fill of count badges and dots. Red by default: on every platform people read a red count as unread.
badgeLabeldefault"unread"stringRead by screen readers after a count: "Inbox, 4 unread". The visible badge is hidden from them.
dotLabeldefault"new"stringRead by screen readers after a dot: "Profile, new".
aria-labeldefault"Primary"stringThe name of the <nav> landmark.
hideOnScrolldefaultfalsebooleanSlides down while you scroll down, following the finger, and comes back on scroll up, at the end of the content and whenever focus is inside. Transform only, no re-render per frame.
positiondefault"auto""auto" | "fixed" | "sticky" | "static"auto: fixed to the viewport, or static inside an app shell whose content column scrolls. sticky: sticky bottom-0 as the last child of a scroll container (phone frames, demos). static: in the flow. Writes --bottom-bar-offset (on <html> when fixed, else on its parent) so floating buttons clear it.
safeAreadefaulttruebooleanPads env(safe-area-inset-bottom) so the tabs clear the iPhone home indicator (the floating pill keeps at least 12px). It is 0 in desktop browsers.
hapticsdefaulttruebooleanA 10ms vibration on a tab change where the browser supports it (Android; iOS ignores it).
scrollToTopOnReselectdefaulttruebooleanTapping the active tab scrolls its page to the top (iOS). On a nested page the tab first goes back to its root.
onReselect(item: BottomTabBarItem) => voidRuns when the active tab is tapped again (refresh a feed, focus a search).
scrollTargetHTMLElement | Window | RefObject<HTMLElement | null> | nullWhat scrolls, for hide on scroll and reselect. Default: the nearest ScrollContainerProvider, else the window.
linkComponent(props: LinkComponentProps) => ReactNodeThe router link for this bar only (a component, or "a"). Usually set once for the app with LinkProvider.
classNamesPartial<Record<"inner" | "list" | "link" | "icon" | "label" | "indicator" | "action", string>>Extra classes for the inner parts: the bar surface, the list, each tab link, icon box, label, the indicator and the action.
classNamestringExtra classes for the <nav>, merged last. Set [--bar-bg:var(--surface)] when the bar sits on a surface other than the page.
Parts
BottomTabBarItem
typeOne tab: the shared navigation item (label, href, icon, activeIcon, badge, disabled and the rest of NavItem) plus dot, an 8px dot in place of a count.
BottomTabBarAction
typeThe raised center button (compose, add, scan): { label, icon, onSelect?, href? }.
Examples
Floating
variant="floating": an inset glass pill over a photo feed.
Indicators
pill, line, dot or color only; each moves between tabs on a snappy spring.
Labels
Always, only on the active tab, or never (kept for screen readers).
Hide on scroll
The bar follows your finger out of view and returns on scroll up.
Three to five tabs
Three tabs without an action; four and five tabs around a raised center action.
Live badges
Counts bounce when they change and read as "Inbox, 5 unread".
Brand marketplace
tone="brand" with the line indicator and a camera action.
Files
- components/ui/bottom-tab-bar.tsx
FAQ
Is the React Bottom Tab Bar component free?
The preview, props and docs are free; copying the source needs a Pro plan. See plans.
How do I install Bottom Tab Bar?
Run npx wingo-ui@latest add bottom-tab-bar. It also adds the Wingo UI items it builds on (Badge, useControllableState, useScrollState, Motion presets, Navigation and 2 more) and the npm package motion. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/bottom-tab-bar.
How does Bottom Tab Bar behave on phones?
On a phone it clears the home indicator (safe area) and every tab is far bigger than 44px.
See also
Used in
More React mobile components
Articles using this component
- Konsta UI Alternative for React: Ionic vs Wingo UI
Comparisons and alternatives10 min read
- Nextjs PWA Without next-pwa: Offline Page and App Shell
Mobile UI in React12 min read
- Shadcn Sidebar Mobile: Fix the Sheet and Add a Tab Bar
Mobile UI in React9 min read
- React Floating Action Button: Speed Dial and Safe Areas
Mobile UI in React9 min read