Skip to content

File

Shows the file a file field holds: a photo inline, a PDF as its name and size.

Use it for: Showing an attachment in a list or on a detail screen. Tapping a PDF opens it in Quick Look, where it can be read or shared; links inside it don’t open.

  • CategoryVisual
  • ChildrenNone
  • DataOne field (bindings.value)
  • ActionNone
Prop Required Accepts What it does
label Yes text, up to 200 characters The visible label, also read by VoiceOver.
fit No contain, cover contain shows the whole image; cover fills the space and may crop.

Every component also accepts id (required, unique on its screen), and the optional preset and style described in Style options. Every component except Screen accepts when, described in Data-driven look.

From the Field Inspection example project:

{
"id": "inspection-photo",
"type": "File",
"props": {
"label": "Photo",
"fit": "cover"
},
"bindings": {
"value": {
"model": "inspection",
"field": "photo"
}
}
}