Example#
Case study
Fernlight: from five taps to two
Jordan Reyes wanted fewer phone calls about prices and more about gardens.
Usage#
Use a card for one item in a collection that people compare and open: a case study, a post, a product. With href, the whole card is one link; it lifts on hover and takes a hard offset, like a plate pulled off the press.
- Parts.
title(required, heading level 3 by default),eyebrow,media(top, orstartbeside the text), the body, and afooterfor proof such as numbers. - Plates.
white(default),stockorsunken;sizesmormdsets the padding. - Links inside a link card sit above the stretched title link, so they still work.
- Selected holds the lift and a 3 px rule, for choosers.
- One thing per card. A card that needs two actions is probably a section.
Anatomy#
Case study
Fernlight: from five taps to two
Jordan Reyes wanted fewer phone calls about prices and more about gardens.
- Eyebrow
data-mk-part="eyebrow" - Title
data-mk-part="title" - Body
data-mk-part="body" - Footer
data-mk-part="footer"
Volume#
Reading layer: the card is identical at every volume. Its media slot can hold art that follows the volume.
Quiet
Case study
Fernlight: from five taps to two
Jordan Reyes wanted fewer phone calls about prices and more about gardens.Studio
Case study
Fernlight: from five taps to two
Jordan Reyes wanted fewer phone calls about prices and more about gardens.Press
Case study
Fernlight: from five taps to two
Jordan Reyes wanted fewer phone calls about prices and more about gardens.Rave
Case study
Fernlight: from five taps to two
Jordan Reyes wanted fewer phone calls about prices and more about gardens.
Content#
- Title: the item's name and its point, such as "Fernlight: from five taps to two".
- Body: one or two sentences; a card is a door, not the room.
- Footer: the checkable proof, such as numbers with their units.
Do and don't#
Do
Case study
Fernlight: from five taps to two
Jordan Reyes wanted fewer calls about prices.
Don't
Case study
Fernlight
Accessibility#
- A link card has one link, the title, stretched over the card; other links inside sit above it.
- The focus ring is drawn on the card through
:has(:focus-visible). - The heading level is yours (
titleLevel, default 3).
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
title required | ReactNode | none | |
titleLevel | 2 | 3 | 4 | 3 | Default 3. |
eyebrow | ReactNode | none | |
media | ReactNode | none | |
mediaPlacement | "start" | "top" | none | |
footer | ReactNode | none | |
href | string | none | A link card: the title links here and the whole card is its target. |
linkRender | RenderProp | none | Replaces the title link (e.g. `<NextLink href="/work/fernlight" />`). |
render | RenderProp | none | |
plate | "stock" | "sunken" | "white" | white | Default `white`. |
size | "md" | "sm" | none | |
selected | boolean | none | |
children | ReactNode | none |
Tokens#
System tokens (14)
--mk-border--mk-border-thick--mk-dur-hover--mk-ease-out--mk-focus--mk-radius-plate--mk-space-2--mk-space-3--mk-space-5--mk-space-6--mk-surface--mk-text--mk-z-plate--mk-z-raised
Its own properties (2)
--mk-card-offset--mk-card-pad
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