Tab Bar
Two to five top-level sections at the bottom of a phone screen.
import { TabBar, useTabBarMinimize } from "@plexui/react-native"Put a section's actions in a Toolbar.
Examples
Overview
Platforms
| iOS 26 | Android | |
|---|---|---|
| Native component | Tab bar | A glass capsule of tabs, in place of Material's navigation bar |
| Look | A glass capsule floating over the content, every tab in the label color, the selected one on a pill that slides to a new tab on iOS 27.2's spring, stretching on its way; pressed, the pill lifts into a clear lens that a drag carries across the tabs | A 56dp capsule of see-through glass (the card at 76%, a 0.4dp rim, a soft shadow) 12dp from the edges and 8dp above the gesture bar, at least 320dp of tabs: each a 24dp symbol over a 12sp label, the selected one in the accent on its own 9% pill; search or a prominent tab in a 56dp circle beside it (ours) |
In a browser the iOS capsule, the circles and the accessory are the kit's web glass. In Chromium (Chrome, Edge, Arc) the rim of each also bends what is under it, as iOS 26's Liquid Glass does (the bars' buttons, groups and fields bend theirs too): a lens of a convex bezel, after Glisse's, so the edge shows what lies just past it (a stripe over the capsule curves along its rim). It is drawn once the capsule's size holds still, and while the size changes the capsule keeps its frost alone. Safari and Firefox take no SVG filter in a backdrop and keep the frost. A theme turns the lens off with --mobile-glass-web-refraction: none; the same token turns off the lifted selection's lens, which in Chromium bends what is under its rim and shows it 13% larger.
Android's Tabs are a different component (they switch views inside one screen): use SegmentedControl for those.
API
TabBar
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | The selected tab (controlled); use with onValueChange |
defaultValue | string | — | The selected tab when it is first rendered; the first tab when there is none |
onValueChange | (value: string) => void | — | Called with the value of the tab a person selects |
labels | "visible" | "hidden" | "visible" | hidden draws the tabs by their symbols alone, as a UITabBar whose items have no titles and Material 3's navigation bar without labels: on iOS the capsule keeps 62pt and each symbol stands in its middle, the badges and the selected pill where they were; on Android the symbol is centered in its pill and the badge goes with it, the tabs of one width. A label stays the tab's accessible name; search and prominent tabs draw none either |
search | { value: string; label?: string; icon?: ReactNode; disabled?: boolean; onPress?: () => void; testID?: string } | — | A search tab in a circle of its own at the trailing end; label is its accessible name (default "Search"), icon its symbol (the kit's magnifier by default) |
prominent | { value: string; label: string; icon: ReactNode } | — | The one destination lifted out of the capsule into the circle; with search, search joins the capsule as its last tab |
minimized | boolean | — | Shows the selected tab alone in a 48pt circle on iOS (controlled); useTabBarMinimize drives it from a scroll |
defaultMinimized | boolean | false | The minimized state when it is first rendered |
onMinimizedChange | (minimized: boolean) => void | — | Called when the bar minimizes or expands |
background | "soft" | "fade" | "hard" | "glass" | "none" | "soft" | How the bar meets content under it: soft and none leave it clear around the capsule, as native iOS 26 (soft fades the screen's color under it on Android); fade mutes it, as many iOS apps do: the rows over the capsule stay clear, and from its top the screen's color comes in over 60pt to 85% (minimized, over the row's 48, whole by its foot), held to the screen's edge, with no blur, always drawn (as soft on Android); hard is an opaque band, glass a translucent blurred one |
scrolled | boolean | false | Content is under the bar: the band and the line of background show |
canvasColor | string | the theme's background | The color of the screen under the bar, which its scroll edge takes (a grouped screen's canvas) |
accessory | ReactNode | — | Content in a glass capsule above the tabs, on iOS and on Android |
badgeColor | "danger" | "accent" | — | The badges' color: iOS's red, or the accent with white text, as Android's; a tab's own badgeColor wins. Default: the platform's own (danger on iOS, accent on Android) |
selectionColor | "primary" | "accent" | the ThemeProvider's selectionColor | iOS: the color of the selected tab, of a minimized one and of what the lifted lens passes over: primary, the label color (a bar tinted .primary: the pill alone shows the selection), or accent, the system tint. Android keeps Material's colors |
safeArea | boolean | true | Pads the bar for the home indicator or the gesture bar |
aria-label | string | "Tabs" | Accessible name of the navigation |
children | ReactNode | — | TabBar.Item elements |
style | StyleProp<ViewStyle> | — | Style of the bar (all of View's props pass through) |
TabBar.Item
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | The value of the tab (required) |
label | string | — | The label under the symbol, and the tab's accessible name (required) |
icon | ReactNode | — | The symbol, a Plex UI icon (required) |
badge | ReactNode | — | A count or a short word over the symbol; true draws a dot, 0 shows none |
badgeColor | "danger" | "accent" | — | The badge's color, over the bar's badgeColor |
disabled | boolean | false | The tab cannot be selected |
onPress | () => void | — | Called when the tab is pressed, before it is selected |
testID | string | — | Test id |
useTabBarMinimize
useTabBarMinimize() returns { minimized, onMinimizedChange, onScroll, scrollEventThrottle }: pass onScroll and scrollEventThrottle to the ScrollView, minimized and onMinimizedChange to the TabBar. A scroll of 8 points in one direction flips the bar, and the top of the content expands it.
useTabBarMetrics
useTabBarMetrics({ safeArea, minimized, accessory }) returns { capsuleHeight, bottom, accessoryHeight, accessoryGap, top, floatGap }: the tabs' capsule's height and its distance from the screen's bottom (iOS 62pt over the home indicator, Android 56dp over the gesture bar), the accessory's capsule over it when the bar shows one (iOS 48pt, 8 over the tabs, beside them when minimized; Android 56dp, 8 over the tabs), and top, from the screen's bottom to the highest capsule's top, for content that stands clear of the bar (a floating button, the room under a list). Each length is the bar's token: on Android --tab-bar-accessory-height-android and --tab-bar-accessory-gap-android size the accessory, as --tab-bar-accessory-height and --tab-bar-accessory-gap on iOS. floatGap stands a control floating over the bar above top. On iOS it is --tab-bar-float-gap, which defaults to the accessory's gap (8), as iOS 26 stacks its capsules. On Android it is --tab-bar-float-gap-android (16), Material's margin for a floating action button. usePageMetrics (List) adds it up for a screen.
The bar is a tab list named Tabs, each tab a tab with its selected state, and a badge is read after the label. Minimized, the selected tab that stays expands the bar when pressed.