Example#
Usage#
Every page of the site has one navbar at the top: the logo, the sections, the visitor's utilities and the action key. It is sticky by default and prints on a solid surface, never translucent over moving content.
- Items. Up to about six sections. An item with a
panelbecomes a mega panel: the item stays a link to its hub, and a small disclosure key beside it opens the panel (the APG disclosure navigation pattern), so every section works without JavaScript. - Panels hold groups of links with descriptions and an optional
feature, with the mark lit for the lines the panel covers. - Utilities default to the theme toggle and the compact volume dial (D-B12);
actionholds the page's action key atsm. - Phones (below 64rem) show the logo, the action key and a Menu key that opens
NavSheet. - Current page.
currentsetsaria-current="page"and a 4 px ink rule under the item.
Anatomy#
- Bar64 px on phones, 76 px from 64rem, on the solid surface.
data-mk-part="bar" - LogoThe mark alone below 22.5rem.
data-mk-part="logo" - Menu keyOpens NavSheet. From 64rem the sections, utilities and action key take its place.
data-mk-part="menu"
Volume#
Reading layer: the bar is identical at every volume. The utilities are where visitors turn the volume.
Quiet
Studio
Press
Rave
Content#
- Item labels are one or two words, the names of the sections: "Work", "Pricing".
- The action key repeats the site's main verb: "Get a quote".
- Panel link descriptions say who the page is for, in a line.
Do and don't#
Do
Don't
A navbar with eleven items, a search field, a phone number and two action keys.
Accessibility#
- Mega panels follow the APG disclosure navigation pattern: the item links to its hub, a separate button (
aria-expanded, named "{label}menu") opens the panel, Escape closes it and returns focus. - Without JavaScript every item still links to its hub; on phones the fallback menu key links to the footer's map.
- The current page carries
aria-current="page"and a 4 px rule. - The bar is solid: no translucency over moving content.
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
logo | ReactNode | <Logo href="/" collapse="phone" /> | Default `<Logo href="/" collapse="phone" />`. |
items required | readonly NavItem[] | none | |
utilities | ReactNode | <ThemeToggle /> and <VolumeDial appearance="compact" /> | Default `<ThemeToggle />` and `<VolumeDial appearance="compact" />` (D-B12). |
action | ReactNode | none | The action key, e.g. `<Button variant="action" size="sm" href="/contact">Get a quote</Button>`. |
phoneMenu | ReactNode | none | The phone menu (below 64rem), e.g. `<NavSheet … />`. |
menuHref | string | #mk-footer | The fallback menu key's target (default `#mk-footer`, the footer's map) and name (default "Menu"). |
menuLabel | string | none | |
navLabel | string | "Main" | The navigation's name (default "Main"). |
sticky | boolean | true | Default true. |
Tokens#
System tokens (24)
--mk-border--mk-dur-disclosure--mk-dur-menu--mk-ease-out--mk-focus--mk-font-text--mk-radius-control--mk-radius-plate--mk-rule-soft--mk-space-1--mk-space-2--mk-space-3--mk-space-4--mk-space-6--mk-space-7--mk-space-8--mk-surface--mk-text--mk-text-2--mk-type-body-ui-size--mk-type-nav-leading--mk-width-content--mk-width-wide--mk-z-header
Its own properties (2)
--mk-header-h--mk-navbar-bar-h
Changelog#
Arrived in 0.1.0.
Sectionwith its plate andArtslot,Plate,VolumeScope,PageHero,SectionHead,Eyebrow,Card,LineCard,InfoPanel,Stack,Cluster,Grid,Container,Main,Ruleand theFittedLineclient fitter;Navbarwith theNavDisclosuremega panels,Footer,FooterMap,BuildStamp,SkipLink,ActionDockandVisitorControls; theTableparts,ComparisonTablewith the one-tier switcher,SpecStrip,Numeral,Stat,StatGroup,StatusChip,BadgeandScoreDial;ProsewithmdxComponents,Quote,CodeBlockwithCopyButton,Figure,ScreenshotFrameandPhoneFrame; and the brand: the three evolved 2 × 2 options inmarkGeometry(a Overprint by default, b Paper seam, c Key block) with the pixel-snappedpxmode and the one-ink seam variant,logoGeometrywith the 1x clear-space frame,Mark,Wordmark,Logo,MaxosMarkandLineBadge. Read the whole entry- React: the label role (14 px, now 600) prints in
--mk-textin Eyebrow, the Card and PageHero eyebrows, SpecStrip labels, the stacked table's cell headers, the Navbar panel's meta and the NavSheet group titles, because no secondary ink reaches the label's floor; placeholders, input start and end text and the select's empty choice print in the new--mk-on-control-2;Art interactivemarks no layer, so the 3D stage's own art and plate layers decide (its caption and keys never sit inside an art layer). Read the whole entry - StatGroup lays out by its own width (a size container), SpecStrip keeps 2 × 2 inside a narrow container and the Navbar's desktop bar also needs a 60rem header, so phone-width specimens on wide screens no longer squeeze; the Navbar bar wraps rather than spills under wide text spacing. Read the whole entry