Example#
Usage#
Use a phone frame to show a site or an app at phone size: a generic slab body with a pill island, no brand hardware, and the screen untouched. The caption names what is shown.
- Sizes.
s240,m320 andl380 px wide; the radius scales with it. - Video in the screen is muted and starts paused, with a play and pause key at the frame's bottom end. It never autoplays a loop (D-E3).
- Never tilted at rest; the screen holds words.
Anatomy#
- Body
data-mk-part="body" - Screen
data-mk-part="screen" - CaptionNames what the phone shows.
.mk-phone-frame-caption
Volume#
Reading layer: identical at every volume.
Quiet
Fernlight on a phone Studio
Fernlight on a phone Press
Fernlight on a phone Rave
Fernlight on a phone
Content#
- Caption: the site and the screen, "Fernlight on a phone: the price list".
- Video gets a caption that says what happens in it, since many will not press play.
Do and don't#
Do
Don't
A video in a phone frame that plays in a loop as soon as the page loads.
Accessibility#
- The frame is decoration; the caption names what it shows.
- Video is muted, plays inline and starts paused (no autoplay loops, D-E3). The play and pause key at the frame's bottom end is a real button named "Play" or "Pause" and the video's label, so it is reachable by keyboard and announced.
| Keys | What happens |
|---|---|
| Tab,EnterorSpace | Plays or pauses the video (the key at its bottom end) |
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
screen | ReactNode | none | An image element, or use `video`. |
video | { src: string; poster?: string; label: string; type?: string; } | none | A video source: muted, inline and paused, with a play and pause key at the frame's bottom end. |
caption | ReactNode | none | |
size | "l" | "m" | "s" | none | 240 / 320 (default) / 380 px wide. |
Tokens#
System tokens (6)
Its own properties (2)
--mk-phone-r--mk-phone-w
Changelog#
Arrived in 0.1.0.
- phone-frame: video in a
PhoneFramestarts paused with a play and pause key at the frame's bottom end (the client leafPhoneVideo, on IconButton's markup, named "Play {label}" and "Pause {label}"), instead of the platform's controls (DF-33, supersedes D-N78). The video stays muted and inline and never autoplays (D-E3).
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