Navbar
Plain horizontal nav (no sticky positioning or theme toggle; use AppBar for that). Supports linkComponent / linkProp for routers.
Props
Navbar
brandReactNodeBrand name or element.
linksNavbarLink[]Default:[]Navigation links. See the NavbarLink table below.
actionsReactNodeControls on the right.
linkComponentElementTypeDefault:'a'Component used for links, e.g. a router Link.
linkPropstringDefault:'href'Name of the destination prop on
linkComponent(e.g. "to" for react-router).labelstringDefault:'Main'Accessible name of the nav.
classNamestringDefault:''Extra classes for the root element.
| Prop | Type | Default | Description |
|---|---|---|---|
brand | ReactNode | – | Brand name or element. |
links | NavbarLink[] | [] | Navigation links. See the NavbarLink table below. |
actions | ReactNode | – | Controls on the right. |
linkComponent | ElementType | 'a' | Component used for links, e.g. a router Link. |
linkProp | string | 'href' | Name of the destination prop on linkComponent (e.g. "to" for react-router). |
label | string | 'Main' | Accessible name of the nav. |
className | string | '' | Extra classes for the root element. |
NavbarLink
hrefstringDestination of the link.
labelstringText of the link.
activebooleanDefault:falseMarks the current page.
...linkPropsAny other attribute is passed to the link element.
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | – | Destination of the link. |
label | string | – | Text of the link. |
active | boolean | false | Marks the current page. |
...linkProps | – | Any other attribute is passed to the link element. |