Example#
Fernlight
Booked out to March, and the price list is on the first screen.
Usage#
Every block of a page is a Section. It is the legibility rule in code: the words print on a plate, and the art, if there is any, sits beside, above, below or around that plate, never under the words (D-B1).
plateis where the children print: the stock (default),white,sunken, the slab or a line plate. Every plate is opaque and re-scopes the text, rule and focus inks, so components read right on it.arttakes one<Art>element;artPlacementputs it at theend(default),start,above,beloworsurround, andartOnPhonedecides where it goes below the md width. Withsurround, the plate becomes an inset with a paper gutter.volume="up"prints the section one step louder than the page, for a hero or a campaign band. Absolute volumes are for the places D-B3 allows: heroes up to Press, campaigns and the 404.- Pins.
stock,themeandcolourwaypin a subtree, such as a Night band or a client colourway on a case study. width(prose,content,wide,full) andspace(nonetolg) set the measure and the rhythm.
Anatomy#
Fernlight
Booked out to March, and the price list is on the first screen.
- Inner
data-mk-part="inner" - Plate
data-mk-part="plate" - Art
data-mk-part="art"
Volume#
The plate and its words never change. The art slot is where the volume shows: at Quiet art stays still and flat, from Studio it can move and settle, and at Press and Rave a loop gets a pause key.
Quiet
Fernlight
Booked out to March, and the price list is on the first screen.
Studio
Fernlight
Booked out to March, and the price list is on the first screen.
Press
Fernlight
Booked out to March, and the price list is on the first screen.
Rave
Fernlight
Booked out to March, and the price list is on the first screen.
Content#
- One idea per section, introduced by a
SectionHead. - Name a section that is a landmark with
labelledBypointing at its heading; most sections need no landmark. - Art is decoration or a picture with its own alternative text; a sentence is never written into the art.
Do and don't#
Do
Fernlight
Booked out to March.
Don't
Fernlight
Booked out to March.
Accessibility#
- The plate comes first in the DOM, so reading order never depends on where the art is drawn.
Artisaria-hiddenunless it has alabel(thenrole="img") or isinteractive(the 3D pile brings its own keyboard and text alternatives).- A section is a region landmark only when you give it
labelledByoraria-label. surroundkeeps an opaque plate with a gutter over the art; the art never takes pointer events over the plate.
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
render | RenderProp | <section> | Default `<section>`. |
theme | "bone" | "night" | none | Pins `data-mk-theme` on the subtree. |
colourway | ColourwayId | none | Pins `data-mk-colourway` (a client colourway on a case study). |
volume | SectionVolume | none | `inherit` (default), `up` (`data-mk-volume-step="up"`), or an absolute volume (D-B3 places only). |
art | ReactElement<unknown, string | React.JSXElementConstructor<any>> | none | Must be an `<Art>` element. |
artOnPhone | "above" | "below" | "hide" | none | Below the width where art sits beside the plate: above, below (default) or away. |
artFrom | "lg" | "md" | none | Where `end` and `start` art moves beside the plate: the md container width (default) or lg (PageHero). |
width | SectionWidth | none | 70ch · 72rem (default) · 90rem · 100 %. |
space | SectionSpace | md | Block padding 32 / 64 / 96 px (phones 24 / 48 / 64); default `md`. |
labelledBy | string | none | Makes the section a region landmark (or pass `aria-label`). |
children required | ReactNode | none | The reading layer. |
stock | "bone" | "kraft" | "newsprint" | "night" | "pulp" | "white" | none | |
plate | "action" | "custom-apps" | "growth" | "maxos" | "none" | "slab" | "software" | "stock" | "sunken" | "websites" | "white" | none | |
artPlacement | "above" | "below" | "end" | "start" | "surround" | none |
Tokens#
System tokens (19)
--mk-paper--mk-radius-plate--mk-space-12--mk-space-16--mk-space-24--mk-space-3--mk-space-4--mk-space-5--mk-space-6--mk-space-8--mk-surface--mk-text--mk-v-loop-control--mk-width-content--mk-width-prose--mk-width-wide--mk-z-art--mk-z-plate--mk-z-raised
Its own properties (2)
--mk-section-gutter--mk-section-pad
Changelog#
Arrived in 0.1.0.
Section's development check accepts anArtfrom any copy of the module through aSymbol.forbrand (ART_BRAND,isArtElement; DF-48). Read the whole entry
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