Flab Mobilev0.0.2
Flab UI docs

Tab bar

Bottom navigation for top-level sections. The mobile counterpart to the desktop Sidebar: the active item colours its icon and label with the accent and sets aria-current, so the current section reads by colour and text — never a bare dot.

Example

<TabBar aria-label="Sections">  <TabBarItem icon={<Home />} label="Home" active={tab === 'home'} onClick={() => setTab('home')} />  <TabBarItem icon={<Inbox />} label="Inbox" count={4} active={tab === 'inbox'} onClick={() => setTab('inbox')} />  <TabBarItem icon={<User />} label="Me" active={tab === 'me'} onClick={() => setTab('me')} /></TabBar>

TabBarItem is polymorphic through the render prop — pass a framework link element to make it navigate instead of firing an onClick.

Props

PropTypeDefaultNotes
TabBarItem.labelReactNode—Text under the icon; required.
TabBarItem.iconReactNode—Icon stacked above the label.
TabBarItem.activebooleanfalseAccent colour + aria-current="page".
TabBarItem.countnumber—Badge over the icon; shown only when positive.
TabBarItem.renderReactElement—Render as a link instead of a button.