Orbit Nav
An icon tab bar where the active tab grows into a labelled pill, with badge counts.
$
View as Markdownnpx shadcn@latest add https://sundaeui.dev/r/orbit-nav.jsonOverview
Inactive tabs are icons; the active one widens to show its label with a springy grid-column transition, so neighbours glide aside instead of jumping.
Badges sit on the icon and are included in the tab’s accessible name.
When to use
- Bottom navigation in mobile web apps.
- Compact section switchers in toolbars.
When not to use
- More than five destinations.
- Labels people need to see all the time.
Installation
$
pnpm dlx shadcn@latest add https://sundaeui.dev/r/orbit-nav.json$
npx shadcn@latest add https://sundaeui.dev/r/orbit-nav.json$
yarn dlx shadcn@latest add https://sundaeui.dev/r/orbit-nav.json$
bunx --bun shadcn@latest add https://sundaeui.dev/r/orbit-nav.jsonWorks in any React project. Files are written to components/sundae/. Read the source in the stage’s Code view.
- No dependencies beyond React 18 or later.
- Copy orbit-nav.tsx and orbit-nav.css into components/sundae/.
- The CSS file is imported by the component, so no extra configuration is needed.
- Import the component and use it as shown below.
Usage
import { OrbitNav } from '@/components/sundae/orbit-nav'
<OrbitNav items={items} value={tab} onValueChange={setTab} />Props
| Prop | Type | Default |
|---|---|---|
items*id, label, icon and optional badge. | OrbitItem[] | — |
value*Active id. | string | — |
onValueChange*Called on change. | (id: string) => void | — |
shapeCorner style. | 'pill' | 'squircle' | 'pill' |
accentActive pill colour. | string | '#ffffff' |
fillSurface: dark or light. | 'dark' | 'light' | 'dark' |
Accessibility
- A tablist with roving tabindex; tabs expose aria-selected.
- Badges are part of the name ("Inbox, 3 new").
- Reduced motion makes the expansion instant.
Customization
- Every colour is a CSS custom property on the root class; override them in your own stylesheet.
- fill="light" switches the built-in light palette.
Keyboard
- ← / →
- Previous / next tab
- Tab
- Leave the bar
FAQ
- Is Orbit Nav free?
- Yes. Orbit Nav is free for personal and commercial projects, with full source on this page.
- How do I install Orbit Nav?
- Run npx shadcn@latest add https://sundaeui.dev/r/orbit-nav.json. The files are written to components/sundae/. It has no dependencies beyond React 18 or later.
- Does Orbit Nav support keyboard and screen readers?
- A tablist with roving tabindex; tabs expose aria-selected. Badges are part of the name ("Inbox, 3 new").
- Does Orbit Nav respect reduced motion?
- Reduced motion makes the expansion instant.
More like this
All navigation →Taffy Tabs
Navigation · Playful- Pro
Magnify Dock
Navigation · Playful Bottom Tab Bar
Navigation · RefinedUnderline Tabs
Navigation · RefinedVertical Tabs
Navigation · RefinedSegmented Control
Navigation · Refined