Duolith docs

TabBar

The row of tabs along the bottom of a layout, one TabBarItem per tab, clear of the home indicator.

Stability: experimental

Props

PropTypeDefaultMeans
labelstringTabsThe navigation landmark's name, for an app with more than one.
railbooleanfalseIn 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

StateLooks like
railWith rail, in a large window: an 88px column with a line on its trailing side, before the screen.

Accessibility

rolenavigation, named by label
nameThe label prop, Tabs unless given.
focusEach item is a link in the Tab order.
notesPadding 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>