Component docs
Loading
import { BottomNavigation } from "@pixxl-tools/components";
// In Server Components:
import { BottomNavigation } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
items (required) | readonly PixxlNavItem[] | — | Items with href render links (through PixxlProvider linkComponent), items without one render buttons that select them. |
defaultValue | string | null | — | Selected item id when uncontrolled. |
onValueChange | (value: string) => void | — | Called with the id of the activated item. |
renderLink | PixxlRenderLink<PixxlNavItem> | — | Per-component link override (see PixxlRenderLink). |
value | string | null | — | Id of the current item (aria-current="page"); null for none. |
itemsrequiredreadonly PixxlNavItem[]
Items with href render links (through PixxlProvider linkComponent), items without one render buttons that select them.
defaultValuestring | null
Selected item id when uncontrolled.
onValueChange(value: string) => void
Called with the id of the activated item.
renderLinkPixxlRenderLink<PixxlNavItem>
Per-component link override (see PixxlRenderLink).
valuestring | null
Id of the current item (aria-current="page"); null for none.
const items = [
{ id: "home", label: "Home", href: "/" },
{ id: "search", label: "Search", href: "/search" },
];
<BottomNavigation items={items} />