Content
Media
An image in a fixed frame: screenshots, device mockups and photos, framed or full-bleed.
- Experimental
- No keyboard interaction
- Screen reader not tested yet
Playground
Change the props. The controls come from the documented props.

<Media
src="/portfolio/cases/lvm-contract-management.webp"
alt="LVM contract management on a laptop: changing the insurance cover of a fleet"
width={1146}
height={739}
/>Usage
When to use
Use Media for every image in a screen or a pattern: case visuals, device mockups, screenshots, photos.
When not to use
- For logos: use LogoStrip.
- For icons: they belong inside the component that uses them.
How it works
The image sits in a frame with the card radius. ratio fixes the proportion so a row of images lines up; auto keeps the file's own. framed puts device mockups and cut-outs on the subtle surface, contained and padded; without it the image fills the frame. SVG files are served as they are, everything else through Next's image optimisation.
Content guidelines
Alt text says what the screen shows and why it matters (“DB Navigator Quick Booking on a phone: one swipe buys the ticket”), not “screenshot of …”. Trim transparent padding from mockups before use.
Do and don’t
Do
- Trim transparent padding from mockups before use, so framed images line up.
- Write alt text that says what the screen shows, not that it is a screenshot.
Don’t
- Don't put text into images; it can't be read, translated or searched.
Anatomy
The parts of the component and what each one does, as in the playground above.
- containerCard radius; the subtle surface when framed.
- medianext/image, contained when framed, cover otherwise.
Examples
Type-checked, and the same code goes into the AI manifest. Import: import { Media } from "@/ds";
Framed mockup

Portrait mockup

Props
Checked against the component's TypeScript type on every build.
| Name | Type | Default | Description |
|---|---|---|---|
| src (required) | string | – | Image file, ideally WebP, trimmed to its content. |
| alt (required) | string | – | What the image shows. Empty only for decorative images. |
| width (required) | number | – | Intrinsic width of the file. |
| height (required) | number | – | Intrinsic height of the file. |
| ratio | "auto" | "16/9" | "4/3" | "3/2" | "1/1" | "auto" | Frame proportion; auto keeps the image's own. |
| framed | boolean | false | Contained on the subtle panel with padding, for mockups and cut-outs. |
| focus | "center" | "top" | "center" | Which part stays visible when a cover image is cropped; top for page screenshots. |
| priority | boolean | – | Load first; only for the one image in the first screen. |
| sizes | string | – | Rendered width hint for responsive images. |
Tokens used
Derived from the utility classes in the component's source. Copy a class with one click.
| Token | Tier | Value | Utility |
|---|---|---|---|
| card.radius | component | 16px | |
| spacing.6 | semantic | 24px | |
| spacing.8 | semantic | 32px | |
| surface.subtle | semantic | #E7E3DA |
Accessibility
What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
| Check | How | Status |
|---|---|---|
| axe-core rules | Automated on every npm run check, at desktop and mobile width | Runs on every build |
| Keyboard | Automated Playwright test (scripts/keyboard.mjs) | Not applicable |
| Screen reader | Manual | Not tested yet |
Semantics and focus
- alt is required. Use an empty alt only for images that add nothing beyond the text next to them.