Components · Navigation
MobileNav
The phone tab bar — up to 5 destinations at the bottom of a top-level page, the selected one's icon in a yellow sticker.
import { MobileNav } from "@botiverse/raft-ui";MobileNav is the phone web's tab bar: a row of a product's destinations at the bottom of every top-level page. The selected destination's icon sits in a yellow sticker. Pushed pages cover it. Its last tab can be the current server, which opens a popover instead of a page. The iOS and Android apps draw the same destinations with their own system tab bar instead (Navigation).
When to use
How the tab bar works with Back and pushed pages, and how many destinations it holds, is in Navigation. Nothing is attached above the tab bar; where working agents appear instead is in Working agents. Which destinations a product has is on its own page (Raft Chat).
Anatomy
MobileNavRoot: the edge bar, onlayer-card(in dark mode onlayer-frame, the same dark layer as the tab header), with aline-seamalong its top edge and padding for the bottom safe area. It runs the full width at the bottom edge; it is never a floating pill.MobileNavItem: one destination: a 22px icon, then its label.MobileNavLabel: the label, intext-label. It truncates.
Search and the server tab
A product can give one of the tab bar's slots to Search and make its last tab the current server. Raft Chat does both, in its mobile app and on the phone web.
- Make Search a tab like the others: its page is a top-level page, with no Back, and the bar stays with Search
selected. Search never shows an attention dot. How its page and its results behave is in Navigation. - Make the last tab the current server when the product has servers and more destinations than fit: the server's own pages go into its popover (The server tab). It replaces the More tab, a page that listed the remaining destinations, which Raft Chat had until 2026-10-22.
raft-ui draws Search with MobileNavItem and the server tab with MobileNavServerItem. Separate parts for a floating pill and a Search button (MobileNavPill, MobileNavSearch) are no longer planned.
The server tab
The last tab is the current server: its avatar where the other tabs have an icon, its name as the label. It is the one tab that opens a popover, not a page (Navigation). Experimental: its parts are exported from @botiverse/raft-ui/wip, and their API can change in any release.
MobileNavServerPopover: the root, a Base UI Popover root. It owns the open state (open,defaultOpen,onOpenChange). Put it insideMobileNavRoot, as the last item; it renders nothing of its own.MobileNavServerItem: the tab, aMobileNavItemthat opens the popover. Children are the server's Avatar (type="server", drawn at 22px, the size of the other tabs' icons) and its name inMobileNavLabel, which truncates. It takes noselected: it holds no page, so it is never selected. While the popover is open, it shows the press fill under its avatar.MobileNavServerPopoverContent: the popover, a Popover panel that rises above the tab bar, 8px from each side and 8px above it, as tall as its content and at most 60% of the screen (60dvh). The one exception: the list always keeps one whole two-line server row, so where the parts after it leave less, the popover grows past 60% as far as that row needs, and no further; where the screen is too short even for that, the whole popover scrolls, the footer actions and the pages with it. The exception is Jasper's call (2026-11-10), after Lagoon saw the list squeezed to a sliver: the current row must stay visible, which can be measured, so it is not a different design choice. It is a column of the parts below, with aPopoverSeparatorbetween them.MobileNavServerPopoverList: the server list. It takes the room left in the popover, never less than one whole two-line row, and scrolls inside it, so the parts after it stay in view. It opens already scrolled to the current server's row (aria-current="true"), with no animation.MobileNavServerPopoverRow: a row with the option padding of every popup list, 36px for one line, a second line adding only its own height (Forms): a 20px avatar or a 16px icon,MobileNavServerPopoverRowLabel, which truncates, then a check, a Badge or a gray count.aria-current="true"sets the current server in bold.MobileNavServerPopoverRowBodyandMobileNavServerPopoverRowSubtitle(wasMobileNavServerPopoverRowDescription): a server's name over its slug (/raft-hq), in muted Space Mono, as the switcher shows it. The avatar and the trailing check or count center on both lines.MobileNavServerPopoverDestinationsandMobileNavServerPopoverDestination: the server's own pages in equal buttons, each a 20px icon over its label in aspan. Up to 4 sit in one row (data-layout="row"); more than 4 take 3 columns, rows of 3 with the last row from the start (data-layout="grid"), at the same height, so every label keeps a third of the popover and stays whole in every language: "Computadoras" fits at 360px wide. raft-ui counts the buttons, looking inside fragments, so the pages a guest lacks can sit in one. The buttons are agroup; name it witharia-label, such as the server's name.MobileNavServerPopoverGroup: rows that always stay in view, such as the footer actions.
The popover's rows are the product's: the server list as the switcher has it (Switching servers), then the switcher's footer actions, then the server's own pages in MobileNavServerPopoverDestinations at the very bottom, nearest the tab bar. Raft Chat's are in Raft Chat.
- A press opens the popover, and a second press closes it.
- A long press, 500ms holding still, opens it too, the same moment raft-ui's other long-press menus open (States). Lifting the finger leaves it open, and a long press while it is open leaves it as it is. A finger that moves more than 10px is a scroll, not a hold. The tab blocks the system's own long-press popover and text selection.
- Opening it moves focus to the current server's row, which the list already shows, so focus never scrolls the list back to the top. A touch puts focus on the popover itself instead, which scrolls nothing and brings up no keyboard.
initialFocusonMobileNavServerPopoverContentoverrides this. - Esc, a press outside the popover and choosing a row close it; focus goes back to the tab. When a row opens a pushed page, the product gives focus back to the tab when people come back from it, as the example does.
- It is a popover (a
dialog), not an ARIA menu: its rows are buttons, reached with Tab, without arrow-key navigation.
The vertical tab bar
On a foldable phone's outer screen, the tab bar stands at the bottom of the system's column, on the side of the screen (Page structure). The iOS app's is the system's own tab bar, turned upright by the system; these rules hold for any tab bar drawn there.
- Keep the order, first at the top: in Raft Chat, Home, Activity, the person's first place, Search, then the server.
- Show the icons only: the column has no room for labels. Keep each label as the item's accessible name, the server tab's server name included, with the dot when there is one ("Raft HQ, another server has unread items").
- Wrap only the icon in the selected sticker, as in the bar (States).
- Make every target at least 44×44pt, with the hit area rather than a bigger icon, counting the space between stacked icons.
- Open the server tab's popover beside the tab, toward the content: its bottom edge level with the tab's, 8px from the column's inner edge, at most 60% of the screen's height, with the same exception for one whole server row. There is no room above the tab in a column.
- Show it on top-level pages only; a pushed page's column has Back instead. It hides while the keyboard is open, as below.
Behavior
- Hide the bar while the on-screen keyboard is open. Pinned above the keyboard, it would cover the field being typed in and the composer. When the keyboard closes, bring the bar back with the platform's default transition, not an instant jump, so people can see the navigation return rather than wonder where it went.
- Show the bar only on top-level pages: a page with Back never shows it (Navigation). Pushed pages cover it; menus, dialogs and bottom sheets leave it as it is.
- Keep the bar in place while a page scrolls. Don't hide it on scroll: it is how people know where they are.
- An item switches when the finger lifts, so a tap while the page is still momentum-scrolling switches tabs at once (Switching on finger lift).
- Tapping the selected item scrolls its page to the top, and on Search focuses the field. On a Raft App's item it opens the App's actions as a menu rising above the item, titled with the App's name: Raft can't scroll the App's page. Each tab keeps its page's scroll position and filters while another tab is open (Navigation).
- Never make a long press the only way to an item's actions: the iOS system tab bar has no long-press menu, so they would be missing there. The server tab's long press only opens the popover its press opens (The server tab).
States
The sticker wraps only the icon, not the whole item: a yellow item adds another strip of frame at the bottom of the screen, and wrapping only the icon halves the color while the selection still reads at a glance (Navigation).
Content
- Label every item, in sentence case (Typography). Keep a label to at most 8 Latin letters or 4 Chinese characters, so 5 items fit at 320px; a longer one truncates. The server tab's label is the server's name, which people choose: it truncates, and the avatar beside it still tells servers apart.
- Which items can show an attention dot is the product's choice. Say other news inside the page instead.
- Show a dot, never a count, on the tab bar: the count belongs inside the page, next to what it counts.
- Dot the server tab only when another server has unread items, the one meaning the same avatar and dot have on Home's WorkspaceButton. Something new on one of the server's pages gets its dot on that page's button in the popover, an
accentStatusinsideMobileNavServerPopoverDestination, never on the avatar.
Accessibility
MobileNavRootrenders anav. Name it witharia-label="Primary".MobileNavItemrenders the Base UI Button;selectedsetsaria-pressed. For an item that navigates, render a link (render={<a href="…" />}withnativeButton={false}) and setaria-current="page"on the selected one: raft-ui sets neither on a link.- The visible label names the item. When an item shows an attention dot, give it an
aria-labelthat says both: "Raft HQ, another server has unread items". The dot itself isaria-hidden. - Give the server tab an
aria-labelwith the server's name, so the avatar's initial is not read as part of it. It announces its popover (aria-haspopup="dialog",aria-expanded); name the popover with anaria-labelonMobileNavServerPopoverContent, such as "Servers". Focus moves into the popover when it opens and back to the tab when it closes. A press opens it, so nobody needs the long press.
API
MobileNavItem
Also takes the attributes of its element.
MobileNavLabel, MobileNavRoot
Also takes the attributes of its element.
MobileNavServerItem
Takes the attributes of its element.
MobileNavServerPopover
MobileNavServerPopoverContent
Also takes the attributes of its element.
MobileNavServerPopoverList
Also takes the attributes of its element.
MobileNavServerPopoverGroup, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, MobileNavServerPopoverRowSubtitle, MobileNavServerPopoverRowLabel, MobileNavServerPopoverDestinations, MobileNavServerPopoverDestination
Takes the attributes of its element.
Related
Changes
- 0.103.4 · FixedFrame insets (
Popover,DropdownMenu,ContextMenu,Select,Combobox,ComboboxSelect,Tooltip,PreviewCard,CoachMark,NotificationCenter,MobileNavServerPopover,ToastPositioner,ComposerSuggestionList):--raft-frame-inset-startand--raft-frame-inset-endare the corners of the window's top band (--raft-frame-inset-top), not columns down its sides. A popup anchored under the band keeps its own padding from the window's edge; only one anchored in the band (a title-bar control, or a context menu opened in the bar) keeps 8px clear of a corner. - 0.103.3 · FixedFrame insets (
useFrameInsets,frameCollisionBoundary): opening a positioned popup (Popover,DropdownMenu,Select,Combobox,ComboboxSelect,ContextMenu,Tooltip,PreviewCard,NotificationCenter,MobileNavServerPopover,ComposerSuggestionList) no longer stalls the main thread when--raft-frame-inset-*holds acalc()orenv(titlebar-area-*)expression on an overlay title bar. - 0.103.0 · Breaking ChangesData parts named for what they hold:
SearchEntityResultDescription→SearchEntityResultSubtitle,PreviewCardDescription→PreviewCardSubtitle,TaskCardDescription→TaskCardSubtitle,MobileNavServerPopoverRowDescription→MobileNavServerPopoverRowSubtitle(and their…Propstypes), andStep'sdescriptionprop →subtitle. Their look anddata-slotvalues are unchanged. - 0.83.0 · FixedThe server tab's popover keeps one whole server row and opens on the current server:
MobileNavServerPopoverListis never shorter than one two-line row. Where the footer actions and the pages would leave it less inside 60% of the screen,MobileNavServerPopoverContentgrows past 60% as far as that row needs; where the screen is too short even for that, the whole popover scrolls, the footer and the pages with it, in a ScrollArea. On open the list scrolls, with no animation, to the row witharia-current="true", and focus goes to that row (a touch still focuses the popover itself), so focus no longer scrolls the list back to the top. - 0.73.0 · ChangedEvery region that scrolls is a ScrollArea:
PanelScrollViewport,ActivityInboxViewport,SearchShellViewport,NotificationCenterScroller,FilesViewport,TasksPanelViewport, ChoiceList's scroller,MobileNavServerPopoverList,ComposerSuggestionList,AnnouncementDialogBody,MessageActionCardScopeListViewportandDialogNavshow ScrollArea's overlay scrollbar instead of the platform's. Native scrolling stays only in the places scroll-area.md lists, each with its reason, and a test fails on any other.