Weftv0.4.0
GitHubFigma
Blade AI
Navigation · Bottom Navstable

Bottom Nav

The main navigation on mobile: four or five top-level destinations, each with an icon, a short label and an active state. A BottomNav holds BottomNavItems, with an optional count badge.

Preview

#preview

Change the options and the code follows. Show code opens the React snippet.

bottom-nav-example.tsx
import { BottomNav, BottomNavItem } from "@blade-ai/weft/components/bottom-nav";

<BottomNav>
  <BottomNavItem label="Home" icon={HomeIcon} href="/" />
  <BottomNavItem label="Payments" icon={PaymentsIcon} href="/payments" isActive badgeCount={3} />
  <BottomNavItem label="Payouts" icon={PayoutsIcon} href="/payouts" />
</BottomNav>

All states

#all-states

Item states and the full bar, from the Bottom Nav artboard.

Bottom Nav · 6 item states · bar
Default
Active
Hover
Pressed
Focus
Disabled
Bar · item on Payments

Props

#props

Read from the component source. Booleans are is-prefixed. A star marks a required prop.

BottomNav
Prop
Type
Default
Description
children *
React.ReactNode
—
BottomNavItem children. Keep to five or fewer.
accessibilityLabel
string
"Primary"
Accessible name of the navigation landmark.
BottomNavItem
Prop
Type
Default
Description
label *
string
—
Visible label under the icon.
icon *
IconComponent
—
Icon component, drawn at 24px.
isActive
boolean
false
Marks the current destination. Exposed as aria-current="page".
badgeCount
number
—
Count shown in a red pill over the icon. Hidden when 0 or unset.
href
string
—
Renders <a href> instead of <button>.
isDisabled
boolean
false
—
onClick
(event: MouseEvent<HTMLElement>) => void
—
Not fired while isDisabled.

Usage

#usage

Short rules for choosing and writing bottom nav.

Do
Use it for the 4 to 5 most used top-level sections, on mobile only.
Pair every icon with a one-word label.
Show the count on the item when something needs attention.
Don't
Put actions such as Create or Refund in the bar.
Hide labels to save space.
Use more than five items; tap targets shrink.

Accessibility

#accessibility

A nav landmark of links or buttons. The current item is marked aria-current="page".

Keyboard
Key
Action
Tab / Shift+Tab
Moves between items.
Enter
Opens the focused destination.
ARIA
Element
Role / attribute
When
BottomNav
nav · aria-label = accessibilityLabel
Defaults to "Primary".
Active item
aria-current="page"
isActive.
Item with count
aria-label "Payments, 3 new"
badgeCount above 0.
Disabled item
disabled / aria-disabled
isDisabled.