FileField
FileField(
props):Element
Defined in: packages/ui/src/fields/file-field.tsx:25
Read-only display component that renders a file reference with an icon, display name, and optional formatted file size.
Uses fileName if provided, otherwise falls back to the raw value string.
File sizes are formatted as B/KB/MB. Returns an em-dash for null/undefined values.
Parameters
Section titled “Parameters”See FileFieldProps.
Returns
Section titled “Returns”Element
A <span> with a file icon, name, and size, or a placeholder for null values.
Example
Section titled “Example”<FileField value="report.pdf" fileName="Q4 Report.pdf" fileSize={2048576} />// -> "Q4 Report.pdf (2.0 MB)"