"use client";
import { ResponsiveNavbar } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
brand (required) | NavbarProps["brand"] | — | Brand slot. |
items (required) | readonly PixxlNavItem[] | — | Items with href are links (provider linkComponent), others buttons. |
value | string | null | — | Current item id (aria-current="page"); null for none. |
actions | ReactNode | — | Action slot (buttons or links). |
breakpoint | ResponsiveNavbarBreakpoint | md | Width from which items show inline instead of the menu (default md). |
closeLabel | string | from the message catalog | Accessible name of the close button (default from the message catalog). |
defaultValue | string | null | — | Current item id when uncontrolled. |
menuLabel | string | Open menu | Accessible menu-open label. |
mobileActions | ReactNode | — | Mobile panel action slot. |
onValueChange | (value: string) => void | — | Called with the id of the activated item. |
renderLink | PixxlRenderLink<PixxlNavItem> | — | Per-component link override, renderLink(props, item): spread props (they close the mobile menu on click and carry aria-current). |
brandrequiredNavbarProps["brand"]
Brand slot.
itemsrequiredreadonly PixxlNavItem[]
Items with href are links (provider linkComponent), others buttons.
valuestring | null
Current item id (aria-current="page"); null for none.
actionsReactNode
Action slot (buttons or links).
breakpointdefault mdResponsiveNavbarBreakpoint
Width from which items show inline instead of the menu (default md).
closeLabeldefault from the message catalogstring
Accessible name of the close button (default from the message catalog).
defaultValuestring | null
Current item id when uncontrolled.
menuLabeldefault Open menustring
Accessible menu-open label.
mobileActionsReactNode
Mobile panel action slot.
onValueChange(value: string) => void
Called with the id of the activated item.
renderLinkPixxlRenderLink<PixxlNavItem>
Per-component link override, renderLink(props, item): spread props (they close the mobile menu on click and carry aria-current).
const items = [
{ id: "docs", label: "Docs", href: "/docs" },
{ id: "blog", label: "Blog", href: "/blog" },
];
<ResponsiveNavbar brand="Pixxl" items={items} value="docs" />