Components · Media
Placeholder
A neutral stand-in so a mockup needs no upload. variant: image (default), video, or map fill the width at ratio (square, photo 4:3, video 16:9, wide 21:9, portrait 3:4); logo is a small wordmark box; avatar is a small circle. label says what goes there. frame: browser or phone draws a plain window or phone around an image, video, or map stand-in, for a product shot; the frame is decoration with no working controls. address (up to 60 characters) is the example web address written in a browser frame's address bar; the bar is decoration, hidden from screen readers, so put what matters in label, which still names the picture.
ExamplesLink to this section
Show JSONHide JSON
{
"version": 1,
"root": "placeholder",
"elements": {
"placeholder": {
"type": "Placeholder",
"props": { "label": "Team photo", "ratio": "wide", "radius": "xl" }
}
}
}Show JSONHide JSON
{
"version": 1,
"root": "row",
"elements": {
"row": {
"type": "Box",
"props": {
"direction": "horizontal",
"stackBelow": "sm",
"align": "end",
"alignBelow": "center",
"gap": "lg"
},
"children": ["desktop", "phone"]
},
"desktop": { "type": "Box", "props": { "grow": true }, "children": ["window"] },
"window": {
"type": "Placeholder",
"props": {
"frame": "browser",
"label": "Dashboard",
"address": "app.example.com/dashboard"
}
},
"phone": {
"type": "Placeholder",
"props": { "frame": "phone", "label": "Home screen" }
}
}
}Show JSONHide JSON
{
"version": 1,
"root": "row",
"elements": {
"row": {
"type": "Box",
"props": {
"direction": "horizontal",
"wrap": true,
"align": "center",
"gap": "md"
},
"children": ["acme", "globex", "person"]
},
"acme": {
"type": "Placeholder",
"props": { "variant": "logo", "label": "Acme" }
},
"globex": {
"type": "Placeholder",
"props": { "variant": "logo", "label": "Globex" }
},
"person": {
"type": "Placeholder",
"props": { "variant": "avatar", "label": "Maya Chen" }
}
}
}PropsLink to this section
Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.
| Prop | Type | Limits and defaults |
|---|---|---|
| variant | "image" | "logo" | "video" | "map" | "avatar" | — |
| label | string | max 80 chars |
| ratio | "square" | "photo" | "video" | "wide" | "portrait" | — |
| radius | "none" | "sm" | "md" | "lg" | "xl" | "full" | — |
| frame | "none" | "browser" | "phone" | — |
| address | string | max 60 chars |
RulesLink to this section
- A placeholder never loads a file. Use Image for an uploaded picture.
labelis what screen readers announce; the small logo and avatar shapes do not show it.frame(browser or phone) draws a window or a phone around an image, video, or map stand-in. The frame is decoration: its dots and bars are not controls and are hidden from screen readers.addresswrites example words in a browser frame's address bar (they are hidden from screen readers with the rest of the frame, so put what matters inlabel). A framed stand-in ignoresradius; a phone frame is at most 256 pixels wide and defaults to the portrait ratio.
Children and eventsLink to this section
Placeholder is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.
It emits no events.