Raft Design System

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.

StableAlso called TabBar, Tab bar, Bottom navigation
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).

mobile-nav/compositions/mobile-nav

When to use

SituationUse
A product's destinations on a phoneMobileNav
The same destinations on desktopAppRail
Sections of one pageTabs
Another view of the same contentSegmentedControl

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, on layer-card (in dark mode on layer-frame, the same dark layer as the tab header), with a line-seam along 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, in text-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.

mobile-nav/compositions/server-tab
  • MobileNavServerPopover: the root, a Base UI Popover root. It owns the open state (open, defaultOpen, onOpenChange). Put it inside MobileNavRoot, as the last item; it renders nothing of its own.
  • MobileNavServerItem: the tab, a MobileNavItem that opens the popover. Children are the server's Avatar (type="server", drawn at 22px, the size of the other tabs' icons) and its name in MobileNavLabel, which truncates. It takes no selected: 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 a PopoverSeparator between 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.
  • MobileNavServerPopoverRowBody and MobileNavServerPopoverRowSubtitle (was MobileNavServerPopoverRowDescription): 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.
  • MobileNavServerPopoverDestinations and MobileNavServerPopoverDestination: the server's own pages in equal buttons, each a 20px icon over its label in a span. 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 a group; name it with aria-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. initialFocus on MobileNavServerPopoverContent overrides 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

StateLook
Not selectedIcon and label in foreground-hint
Selected (selected)The icon in a 56×30px yellow sticker; the label in foreground, bold
AttentionOne pink pixel at the top right of the icon; on the server tab, at the top right of its avatar (AvatarBadge with offset={["100%", 0]} and an accent Status), and only for another server's unread items (States), never a number. Never on the selected item, with no exception

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 accent Status inside MobileNavServerPopoverDestination, never on the avatar.

Accessibility

  • MobileNavRoot renders a nav. Name it with aria-label="Primary".
  • MobileNavItem renders the Base UI Button; selected sets aria-pressed. For an item that navigates, render a link (render={<a href="…" />} with nativeButton={false}) and set aria-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-label that says both: "Raft HQ, another server has unread items". The dot itself is aria-hidden.
  • Give the server tab an aria-label with 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 an aria-label on MobileNavServerPopoverContent, 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

PropTypeDefault
nativeButtonbooleantrue
selectedboolean
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MobileNavLabel, MobileNavRoot

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

MobileNavServerItem

ExperimentalThe tab: the server's avatar and its name in `MobileNavLabel`, as children. A press opens the popover, and so does holding it for 500ms (the long press of raft-ui's menus). Lifting the finger after a hold never closes it: the click that ends the hold is not a press, whether the hold opened the popover or found it open. It is never `selected`: it holds no page.

Takes the attributes of its element.

MobileNavServerPopover

ExperimentalThe root: owns the popover's open state, like `Popover` (`open`, `onOpenChange`).
PropTypeDefault
actionsRefA ref to imperative actions. - `unmount`: Ends the closing phase of the popover after an externally controlled closing animation finishes. Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the popover completes closing on its own. Whether it leaves the DOM is decided by `keepMounted` on the portal. - `close`: Closes the popover imperatively when called.RefObject<PopoverRootActions | null>
childrenThe content of the popover. This can be a regular React node or a render function that receives the `payload` of the active trigger.ReactNode | PayloadChildRenderFunction<unknown>
defaultOpenWhether the popover is initially open.booleanfalse
defaultTriggerIdID of the trigger that the popover is associated with. This is useful in conjunction with the `defaultOpen` prop to create an initially open popover.string
modalDetermines if the popover enters a modal state when open. - `true`: user interaction is limited to the popover: document page scroll is locked, and pointer interactions on outside elements are disabled. - `false`: user interaction with the rest of the document is allowed. - `'trap-focus'`: focus is trapped inside the popover, but document page scroll is not locked and pointer interactions outside of it remain enabled.boolean | "trap-focus"false
onOpenChangeEvent handler called when the popover is opened or closed.(open: boolean, eventDetails: BasePopover.Root.ChangeEventDetails) => void
onOpenChangeCompleteEvent handler called after any animations complete when the popover is opened or closed.(open: boolean) => void
openWhether the popover is currently open.boolean
triggerIdID of the trigger that the popover is associated with. This is useful in conjunction with the `open` prop to create a controlled popover. There's no need to specify this prop when the popover is uncontrolled (that is, when the `open` prop is not set).string

MobileNavServerPopoverContent

ExperimentalThe popover above the tab bar, 8px from each side of it and 8px above it, as tall as its content and at most 60% of the screen. The one exception: the list always keeps one whole server row, so where the parts after it leave less, the popover grows past 60% as far as that row needs (the floor, measured from its children into `--mobile-nav-server-popover-floor`). Where even that doesn't fit, the whole popover scrolls, the footer and the pages with it: the children sit in a ScrollArea (`data-slot="mobile-nav-server-popover-scroll"`) inside the popup. It stops below the top safe area (a notch in a standalone web app): Base UI's collision padding takes only pixels, so the height cap subtracts `env(safe-area-inset-top)`. The bottom needs none: the tab bar under the popover already pads the bottom safe area. A column: `MobileNavServerPopoverList` takes the room left and scrolls, and the destinations and the footer after it stay in view.
PropTypeDefault
collisionPaddingAdditional space to maintain from the edge of the collision boundary: 8px from the window's edge, and 8px from a frame inset where a shell keeps one. A value you pass is kept as it is.Padding8
containerHTMLElement | ShadowRoot | RefObject<HTMLElement | ShadowRoot | null>
portalPropsPopoverPortalProps
size`item` for a popover about an app's item, such as the question before its link previews are shown: 400px, and `PopoverBody`, `PopoverTitle` and `PopoverActions` take a card's parts and 12px inset, like the item card (PreviewCard `size="item"`). Choose it by what the popover is about, not by its parts."default" | "item""default"
alignHow to align the popup relative to the specified side.Align"center"
alignOffsetAdditional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment.number | OffsetFunction0
anchorAn element to position the popup against. By default, the popup will be positioned against the trigger.Element | VirtualElement | RefObject<Element | null> | (() => Element | VirtualElement | null)
arrowPaddingMinimum distance to maintain between the arrow and the edges of the popup.number5
collisionAvoidanceDetermines how to handle collisions when positioning the popup.CollisionAvoidance
collisionBoundaryAn element or a rectangle that delimits the area that the popup is confined to.Boundary'clipping-ancestors'
disableAnchorTrackingWhether to disable the popup from tracking any layout shift of its positioning anchor.booleanfalse
finalFocusDetermines the element to focus when the popover is closed.boolean | RefObject<HTMLElement | null> | ((closeType: InteractionType) => void | boolean | HTMLElement | null)
initialFocusDetermines the element to focus when the popover is opened. By default, focus moves to the first tabbable element inside the popup, except when the popover is opened by touch — then the popup itself is focused to avoid opening the virtual keyboard.boolean | RefObject<HTMLElement | null> | ((openType: InteractionType) => void | boolean | HTMLElement | null)
positionMethodDetermines which CSS `position` property to use."fixed" | "absolute"'absolute'
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)
sideWhich side of the anchor element to align the popup against. May automatically change to avoid collisions.Side"top"
sideOffsetDistance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment.number | OffsetFunction8
stickyWhether to maintain the popup in the viewport after the anchor element was scrolled out of view.booleanfalse

Also takes the attributes of its element.

MobileNavServerPopoverList

ExperimentalThe server list: takes the room left in the popover and scrolls inside it, a ScrollArea (a column with no gap, so its gutters move nothing). It is never shorter than one whole two-line row, and it opens scrolled to the current server's row (`aria-current="true"`), with no animation.
PropTypeDefault
actionsRefMethods to scroll from code that the container doesn't have natively.((instance: ScrollAreaActions | null) => void | (() => void | { [UNDEFINED_VOID_ONLY]: never; }) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<ScrollAreaActions | null>
childrenThe scrolling content, in ScrollArea's own container.ReactNode
contentClassNameClass of a content element around `children`, inside the container: put padding and the content's own layout (grid, flex, `gap`, `stack-y-*`) here, so the scrollbars stay at the edges and the gutters layer is never one of the laid-out children. Only with it, `contentStyle` or `fade` is there one.string
contentRefAn element whose size is the content's, watched for size changes (such as a hidden mirror of a textarea's text). Without it each element child of the container is watched, and children added or removed.RefObject<HTMLElement | null>
contentStyleStyle of the content element; renders it, as `contentClassName` does.CSSProperties
fadeFade the content out toward an edge that has more past it. The scrollbars don't fade.boolean
hideDelayHow long the scrollbars stay after scrolling stops, in ms. At least 100 with `trigger="scroll"`.number
onEdgeChangeCalled when the area reaches or leaves an edge, and after mounting when the content overflows.(edges: ScrollAreaEdges) => void
onScrollThe container's scroll events.UIEventHandler<HTMLDivElement>
orientationThe directions the area scrolls in. Content too wide for a vertical area is cut off.ScrollAreaOrientation
overscrollWhat a scroll that reaches the end does: stop there with no bounce (`none`, the default), stop there but let Mac trackpads and iOS bounce the area (`contain`), or carry on to the page behind (`auto`, which leaves the container's own `overscroll-behavior` alone). Only in the directions the area overflows right now.ScrollAreaOverscroll
railInsetRoom in px the scrollbars keep clear at each end, such as a sticky header's height, so they don't run over it. Also settable in CSS, on the root: `--r-scroll-area-rail-inset-{top,bottom,left,right}`, which don't inherit.ScrollAreaRailInset
renderAnother element in place of ScrollArea's own `<div>`, as the container (an element or a function that gets the props). It must hold children: the gutters are its first child.ReactElement | ((props, state) => ReactElement)
sizeThumb thickness: `small` is 5px, `medium` 7px; both grow while pointed at or dragged.ScrollAreaSize
tabIndexThe container's: by default `0` while there is something to scroll.number
triggerWhen the scrollbars show. They always show while scrolling or dragging.ScrollAreaTrigger

Also takes the attributes of its element.

MobileNavServerPopoverGroup, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, MobileNavServerPopoverRowSubtitle, MobileNavServerPopoverRowLabel, MobileNavServerPopoverDestinations, MobileNavServerPopoverDestination

ExperimentalRows that always stay in view, such as the footer actions.

Takes the attributes of its element.

Changes

  • 0.103.4 · FixedFrame insets (Popover, DropdownMenu, ContextMenu, Select, Combobox, ComboboxSelect, Tooltip, PreviewCard, CoachMark, NotificationCenter, MobileNavServerPopover, ToastPositioner, ComposerSuggestionList): --raft-frame-inset-start and --raft-frame-inset-end are 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 a calc() or env(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 …Props types), and Step's description prop → subtitle. Their look and data-slot values are unchanged.
  • 0.83.0 · FixedThe server tab's popover keeps one whole server row and opens on the current server: MobileNavServerPopoverList is never shorter than one two-line row. Where the footer actions and the pages would leave it less inside 60% of the screen, MobileNavServerPopoverContent grows 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 with aria-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, MessageActionCardScopeListViewport and DialogNav show 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.