TabBar
The row of tabs along the bottom of a layout, one TabBarItem per tab, clear of the home indicator.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
label | string | Tabs | The navigation landmark's name, for an app with more than one. |
rail | boolean | false | In a large window (lg, 1024px and wider) the bar becomes a column at the leading edge. The view around it must lay out as a row there: class="lg:row". |
Children
The TabBarItems, in order.
States
| State | Looks like |
|---|---|
rail | With rail, in a large window: an 88px column with a line on its trailing side, before the screen. |
Accessibility
| role | navigation, named by label |
| name | The label prop, Tabs unless given. |
| focus | Each item is a link in the Tab order. |
| notes | Padding follows env(safe-area-inset-bottom), left and right, so the tabs clear the home indicator and the notch. |
Theme tokens
color.surface color.border space.2 space.4
Example
<TabBar>
<TabBarItem label="Feed" icon="home" href="/" />
<TabBarItem label="Inbox" icon="inbox" href="/inbox" badge={unread} />
</TabBar>