Tab Bar

The tab bar of a phone screen: two to five sections at the bottom in a floating glass capsule, an optional search or prominent tab, minimizing while the content scrolls. Desktop layouts navigate with a Sidebar or Tabs, so a tab bar never renders from 768px up.

import { TabBar } from "@plexui/ui/components/TabBar";

A tab bar moves between the top-level sections of an app on a phone, as the iOS 26 tab bar does: a symbol over a short label for each section, in a glass capsule that floats over the bottom of the content. Keep it to five tabs, and keep it visible in every section. Put actions that change the content of a section in a Toolbar instead. A desktop layout navigates with a Sidebar or Tabs, so the bar renders under 768px only.

Examples

Each example shows the phone view.

Overview

Home

Home 1
Home 2
Home 3
Home 4
Home 5
Home 6
Home 7
Home 8
Home 9
Home 10
Home 11
Home 12
Home 13
Home 14
Home 15
Home 16
Home 17
Home 18
Home 19
Home 20
Home 21
Home 22
Home 23
Home 24

Search tab

Home

Home 1
Home 2
Home 3
Home 4
Home 5
Home 6
Home 7
Home 8
Home 9
Home 10
Home 11
Home 12
Home 13
Home 14
Home 15
Home 16
Home 17
Home 18
Home 19
Home 20
Home 21
Home 22
Home 23
Home 24

Prominent tab

Home

Home 1
Home 2
Home 3
Home 4
Home 5
Home 6
Home 7
Home 8
Home 9
Home 10
Home 11
Home 12
Home 13
Home 14
Home 15
Home 16
Home 17
Home 18
Home 19
Home 20
Home 21
Home 22
Home 23
Home 24

Minimize on scroll

Home

Home 1
Home 2
Home 3
Home 4
Home 5
Home 6
Home 7
Home 8
Home 9
Home 10
Home 11
Home 12
Home 13
Home 14
Home 15
Home 16
Home 17
Home 18
Home 19
Home 20
Home 21
Home 22
Home 23
Home 24

Background

background

Home

Home 1
Home 2
Home 3
Home 4
Home 5
Home 6
Home 7
Home 8
Home 9
Home 10
Home 11
Home 12
Home 13
Home 14
Home 15
Home 16
Home 17
Home 18
Home 19
Home 20
Home 21
Home 22
Home 23
Home 24

API

TabBar

PropTypeDefaultDescription
valuestring—Controlled value of the selected tab
defaultValuestring—Selected tab (uncontrolled)
onValueChange(value: string) => void—Called with the value of the tab a person selects
search{ value: string; label?: string }—A search tab in a glass circle of its own at the trailing end; label defaults to Search
prominent{ value: string; label: string; icon: ReactNode }—A prominent tab in a glass circle of its own at the trailing end, in place of the search circle; search then joins the capsule
minimizeBehavior"never" | "onScrollDown""never"Minimize to the selected tab while the Page content scrolls down
minimizedboolean—Controlled minimized state
defaultMinimizedbooleanfalseMinimized state (uncontrolled)
onMinimizedChange(minimized: boolean) => void—Called when the bar minimizes or expands
background"soft" | "hard" | "glass" | "solid""soft"How the bar meets the content scrolled under it, see Background
aria-labelstring"Tabs"Name of the navigation
classNamestring—CSS classes applied to the bar

TabBar.Item

PropTypeDefaultDescription
valuestring—Value of the tab
labelstring—Label under the symbol and the name of the tab
iconReactNode—The symbol, a PlexUI icon
hrefstring—Makes the tab a link
disabledbooleanfalseThe tab cannot be selected
onClick(event: MouseEvent) => void—Called when the tab is pressed, before it is selected
classNamestring—CSS classes applied to the tab

The bar is a nav named Tabs. Each tab is a button, or a link with href, and the selected one has aria-current="page"; every tab is a stop for the Tab key. The search tab and the prominent tab are named by their label. Minimized, the selected tab that stays in the capsule has aria-expanded="false": pressing it brings the other tabs back. When the search or the prominent tab is the selected one, the capsule keeps its first tab, and pressing that tab selects it.

Styling

TabBar reads these component tokens. Override them at any scope to restyle it:

  • --tab-bar-gutter, --tab-bar-gap: space at the sides and between the capsule and the search circle (default 21px, 8px)
  • --tab-bar-padding-top, --tab-bar-padding-bottom: space above and below the capsule (default 12px, 21px or the safe area)
  • --tab-bar-minimized-padding-top, --tab-bar-minimized-gutter, --tab-bar-minimized-padding-bottom: space around the minimized circles (default 19px, 28px, 28px or the safe area)
  • --tab-bar-capsule-padding-block, --tab-bar-capsule-padding-inline: the capsule around the tabs (default 4px, 10px)
  • --tab-bar-item-width, --tab-bar-item-height, --tab-bar-pill-outset: the widest tab, its height and how far the pill reaches past it (default 94px, 54px, 6px)
  • --tab-bar-icon-box, --tab-bar-icon-size: the line of the symbol and the icon (default 28px, 24px)
  • --tab-bar-label-font-size, --tab-bar-label-line-height, --tab-bar-label-font-weight: the label (default 10px, 12px, semibold)
  • --tab-bar-search-size, --tab-bar-minimized-size: the search or prominent circle and the minimized circles (default 62px, 48px)
  • --tab-bar-item-color, --tab-bar-item-color-selected, --tab-bar-item-color-minimized: tab colors (default light-dark(var(--gray-750), var(--gray-850)), var(--color-text), var(--color-text))
  • --tab-bar-item-background-selected: the selection pill (default var(--alpha-08))
  • The capsule and the circles use the shared mobile glass: --mobile-glass-background, --mobile-glass-sheen, --mobile-glass-shadow-raised and --mobile-glass-backdrop-filter.