Skip to Content
MavKitOne is in beta. @mav-labs-inc/mavkit-react is not public packages yet.

Menu

A pure CSS navigation menu — no JS behavior of its own. Renders a <nav>; lay out .menu-section/.menu-list yourself and compose rows with MenuItem/MenuLink.

Usage

import { Menu, MenuItem, MenuLink } from '@mav-labs-inc/mavkit-react' <Menu aria-label="App navigation"> <ul className="menu-list" role="list"> <MenuItem active> <MenuLink href="#" current>Overview</MenuLink> </MenuItem> <MenuItem disabled> <MenuLink href="#" disabled badge="Soon" badgeNeutral>Changelog</MenuLink> </MenuItem> </ul> </Menu>

Examples

Vertical, with a section

Horizontal

Props

Renders a <nav> and accepts every native <nav> attribute in addition to the props below.

PropTypeDefaultDescription
variant'vertical' | 'horizontal' | 'multicol''vertical'
stickyboolean—Vertical only — sticky positioning + internal scroll for tall sidebars.
underlineboolean—Horizontal only — accent underline on the active item instead of a filled pill.
PropTypeDefaultDescription
activeboolean—Marks the current nav item via .menu-item.is-active — pair with the nested MenuLink's current prop for aria-current.
disabledboolean—Dims the item and removes it from interaction. The nested MenuLink needs its own disabled prop too.
hasActiveChildboolean—Marks a parent item whose nested submenu contains the active link. ScrollSpyNav sets this automatically at runtime — only pass it for static examples.

Also accepts every native <li> attribute.

PropTypeDefaultDescription
as'a' | 'button''a'Element to render — <a> for navigating items, or <button type="button"> for actions that don't navigate.
currentboolean—Marks this the active link via aria-current — pair with the parent MenuItem's active prop.
disabledboolean—
iconReactNode—Optional leading .menu-icon.
badgeReactNode—Optional trailing .menu-badge.
badgeLabelstring—Accessible name for the badge when it differs from its visible content.
badgeNeutralboolean—Styles the badge gray instead of the accent color.
subboolean—Smaller, muted style for links nested inside a .menu-submenu.

Also accepts every native <a>/<button> attribute (whichever as renders).

Styling a custom element as a menu root

import { menuClasses } from '@mav-labs-inc/mavkit-react' <div className={menuClasses({ variant: 'multicol' })}>…</div>
Last updated on