On this page:

File Item

Preview

index.tsx
example1.png200.00 B
example2.png300.00 B
example3.png400.00 B
example4.png500.00 B
example5.png500.00 B

Preview

index.tsx
Choose file0.00 B

Preview

index.tsx
Choose file0.00 B

Design Tokens for FileItem

TokenColor forState/Meaning
--par-color-bg-fileitem-enabledFileItem backgroundEnabled/Default
--par-color-bg-fileitem-failedFileItem backgroundFailed/Error

FileItem also inherits design tokens from the Input and Progress components. For a full list of available tokens, refer to the Input and Progress documentation.


FileItem API Reference

<FileItem />

PropTypeDefaultDescription
fileNamestring"Choose file"The name of the file to display.
fileSizenumber0The size of the file in bytes.
status'error' | 'success' | 'completed''completed'The status of the file item.
loadingnumber0Loading progress percentage (0-100).
disabledbooleanfalseWhether the file item is disabled.
onRetry() => voidCallback when the retry action is performed (on error).
onRemove() => voidCallback when the remove action is performed.
...divPropsHTMLDivElement propsAll native div props (className, style, ...)

Note: FileItem inherits all native props from HTMLDivElement.