MobileTabBar
Bottom bar with four destinations, a badge and an active tab.
Draft launch checklist
Research
PNBook crew interviews
Ops
LSIcon audit
Design
MCHarbour launch
09:00, Maya
Mobile design review
14:00, Jonas
In context
Harbour rebrand
12 of 14 done
Tideline mobile
Review, 3 open
Crew interviews
Late by 2 days
Rota export
Done
7 tasks due, 3 today.
Props
| Prop | Type | Required | Default |
|---|---|---|---|
items | MobileTabBarItem[] | Yes | — |
activeIndex | number | undefined | No | — |
defaultActiveIndex | number | undefined | No | 0 |
onActiveChange | ((index: number) => void) | undefined | No | — |
renderLink | ((props: { href: string; children: ReactNode; className?: string | undefined; onClick?: (() => void) | undefined; "aria-current"?: "page" | undefined; }) => ReactNode) | undefined | No | — |
className | string | undefined | No | — |
position | "fixed" | "static" | undefined | No | fixed |
aria-label | string | undefined | No | Primary |
bionic | boolean | undefined | No | — |
bionicOptions | BionicOptions | undefined | No | — |
Accessibility
A plain <nav aria-label="Primary"> of real, keyboard-focusable <button> or <a> targets (renderLink for a framework router). Every item is at least 44×44 CSS px and always shows both an icon and a label. The active item carries aria-current="page".
data-rebar-* attributes
data-rebar-component="mobile-tab-bar" on the <nav>; data-rebar-part="item" on each item wrapper.
Migrating to Ant Design
AntD has no direct equivalent; a bottom tab bar is a mobile-native pattern. antd-mobile's TabBar is the closer sibling library if the migration target is genuinely mobile.
Tokens
Custom properties, set on the component or any ancestor. The default is what applies when one is unset.
| Property | Default | |
|---|---|---|
--rebar-tab-bar-active-color | var(--rebar-color-text-primary, #212121) | |
--rebar-tab-bar-active-weight | var(--rebar-font-weight-bold) | |
--rebar-tab-bar-color | var(--rebar-color-text-secondary, #757575) | |
--rebar-tab-bar-gap | var(--rebar-space-xs, 4px) | |
--rebar-tab-bar-icon-font-size | inherit | |
--rebar-tab-bar-icon-line-height | inherit | |
--rebar-tab-bar-icon-size | 20px | |
--rebar-tab-bar-item-gap | 3px | |
--rebar-tab-bar-item-min-height | 44px | |
--rebar-tab-bar-item-padding | var(--rebar-space-xs, 4px) | |
--rebar-tab-bar-item-radius | 14px | |
--rebar-tab-bar-label-line-height | 1.2 | |
--rebar-tab-bar-label-size | inherit | |
--rebar-tab-bar-min-height | 56px | |
--rebar-tab-bar-padding | var(--rebar-space-xs, 4px) var(--rebar-space-sm, 8px) | |
--rebar-tab-bar-padding-bottom | var(--rebar-space-xs, 4px) | |
--rebar-tab-bar-safe-area | env(safe-area-inset-bottom, 0px) | |
--rebar-tab-bar-weight | var(--rebar-font-weight-medium) |