Example#
Usage#
NavSheet is the phone menu: a full-screen drawer from the top with the logo, the action key and a close key in a sticky header, the navigation in the body and the visitor controls at the foot. Navbar uses it below 64rem.
- Items with panels become exclusive disclosures listing their links; plain items are links. Rows are 48 px.
- Focus starts on the first link; Escape, the close key and following a link close it (
closeOnNavigate). - Controls. The foot holds
VisitorControls, so theme, volume and sound are reachable on a phone too.
Anatomy#
- HeaderSticky: logo, action key, close key.
.mk-nav-sheet-header - ItemsLinks and disclosures, 48 px rows.
.mk-nav-sheet-items - FootThe visitor controls.
.mk-nav-sheet-foot
Volume#
Reading layer: identical at every volume.
Quiet
Menu
Studio
Menu
Press
Menu
Rave
Menu
Content#
- The same labels as the desktop navbar, in the same order.
- The close key is named "Close menu".
Do and don't#
Do
Menu
Don't
A phone menu with different section names from the desktop navbar.
Accessibility#
- The Menu key opens it with focus on the first item; Escape, Close menu and any link close it.
- Items with panels are disclosures, one open at a time; plain items are links.
| Keys | What happens |
|---|---|
| EnterorSpace on Menu | Opens the sheet; focus moves to the first item |
| TaborShift+Tab | Cycle through the sheet (focus is trapped) |
| EnterorSpace on an item | Opens its group (one at a time) or follows the link and closes the sheet |
| Escape | Closes the sheet; focus returns to Menu |
The colour pairs it prints, with their contrast on both papers:
| Text | Surface | Role | Bone | Night |
|---|---|---|---|---|
--mk-text | --mk-surface | ui | not in this look | not in this look |
--mk-text-2 | --mk-surface | ui | not in this look | not in this look |
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
items required | readonly NavSheetItem[] | none | |
logo | ReactNode | none | |
action | ReactNode | none | The action key, e.g. `<Button variant="action" size="sm" href="/contact">Get a quote</Button>`. |
controls | ReactNode | <VisitorControls /> | The foot (default `<VisitorControls />`, D-B12). |
open | boolean | none | |
defaultOpen | boolean | none | |
onOpenChange | ((open: boolean) => void) | none | |
closeOnNavigate | boolean | true | Close when a link is activated (default true). |
copy | Partial<NavSheetCopy> | none | |
specimen | boolean | none | Docs and press frames only: the open sheet printed in place. |
className | string | none |
Tokens#
System tokens (33)
--mk-border--mk-border-heavy--mk-dur-drawer-in--mk-dur-drawer-out--mk-dur-reduced--mk-ease-out--mk-focus--mk-font-text--mk-radius-control--mk-radius-plate--mk-rule-soft--mk-scrim--mk-space-1--mk-space-10--mk-space-2--mk-space-3--mk-space-4--mk-space-8--mk-surface--mk-text--mk-text-2--mk-type-label-leading--mk-type-label-size--mk-type-label-weight--mk-type-meta-leading--mk-type-meta-size--mk-type-meta-tracking--mk-type-meta-weight--mk-type-row-title-leading--mk-type-row-title-size--mk-type-row-title-tracking--mk-type-row-title-weight--mk-z-overlay
Its own properties (1)
--mk-nav-sheet-pad
Changelog#
Arrived in 0.1.0.
- The reading layer's controls, overlays, forms and visitor prefs (P2-T1 to P2-T5): every Button is the comic hit key, with IconButton, Link and Tooltip; Input, Textarea, Select, Checkbox and CheckboxGroup, Radio and RadioGroup, Switch, Slider with the ruler, RulerReadout and SegmentedControl; Dialog, Drawer, NavSheet, Tabs, Disclosure, Faq and faqJsonLd on Base UI 1.9 where the platform falls short; Field, Fieldset, Form with the site's inline validation, ErrorSummary, Callout, Honeypot, FormTimestamp and QuoteForm; PrefsScript under 1 KB, usePref and setPref with cross-tab sync, ThemeToggle and the visitor VolumeDial; VisuallyHidden.
- 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