Components · Media
File
A download card for an uploaded file: name, type, and size. file is the id from files_finalize; label replaces the shown name.
ExamplesLink to this section
Show JSONHide JSON
{
"version": 1,
"root": "stack",
"elements": {
"stack": {
"type": "Stack",
"props": { "gap": "sm" },
"children": ["report", "labelled"]
},
"report": {
"type": "File",
"props": { "file": "1f6b2a40-93c4-4c8e-b1d2-5e7a9c0f3b21" }
},
"labelled": {
"type": "File",
"props": {
"file": "1f6b2a40-93c4-4c8e-b1d2-5e7a9c0f3b21",
"label": "Board deck, Q3"
}
}
}
}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 |
|---|---|---|
| filerequired | string (uuid) | — |
| label | string | max 200 chars |
RulesLink to this section
- Upload with files_request_upload, PUT the bytes, then files_finalize. Put the returned id in
file. labelreplaces the shown file name.
Children and eventsLink to this section
File 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.