Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
Installation#
pnpm dlx shadcn@latest add @shark/bottom-navigation
Anatomy#
BottomNavigation └── BottomNavigationList └── BottomNavigationItem ├── BottomNavigationItemIcon └── BottomNavigationItemLabel
Usage#
import { BottomNavigation, BottomNavigationList, BottomNavigationItem, BottomNavigationItemIcon, BottomNavigationItemLabel, } from "@/components/ui/bottom-navigation";
<BottomNavigation defaultValue="home"> <BottomNavigationList> <BottomNavigationItem value="home"> <BottomNavigationItemIcon> <HomeIcon /> </BottomNavigationItemIcon> <BottomNavigationItemLabel>Home</BottomNavigationItemLabel> </BottomNavigationItem> <BottomNavigationItem value="notifications"> <BottomNavigationItemIcon> <BellIcon /> </BottomNavigationItemIcon> <BottomNavigationItemLabel>Notifications</BottomNavigationItemLabel> </BottomNavigationItem> </BottomNavigationList> </BottomNavigation>
Disclaimer#
Don't include
position: absoluteon theBottomNavigationList. It's just for the examples.
Examples#
Icon only#
Use aria-label on the BottomNavigationItem to give the item a label for screen readers.
With links#
Use the asChild prop on BottomNavigationItem with Link.
API Reference#
BottomNavigation#
Root wrapper for the bottom navigation bar.
| Prop | Type | Default |
|---|---|---|
value | string | - |
defaultValue | string | - |
onValueChange | (details: ValueChangeDetails) => void | - |
className | string | - |
asChild | boolean | false |
BottomNavigationList#
Fixed bar at the bottom. Typically holds nav items.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
BottomNavigationItem#
Single navigation link or button.
| Prop | Type | Default |
|---|---|---|
value | string | required |
disabled | boolean | false |
className | string | - |
asChild | boolean | false |
BottomNavigationItemIcon#
Holds the item icon.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
BottomNavigationItemLabel#
Holds the item label text.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
For a complete list of props, see the Ark UI documentation.