File Item component

Figma Component
FileItem component is used for displaying attachment files.

file.txt

123 KB

file.txt

Properties

NameDescriptionDefault
description
Description of the file
-
downloading
Shows downloading state
-
embeded
Shows embeded variant
-
icon
Icon or element
-
label

required

Label of the file
-
onCloseClick
callback for close button. Close button is only visible if onCloseClick is provided.
-
onDownloadClick
callback for download button. Download button is only visible if onDownloadClick is provided.
-
uploading
Shows uploading state
-
variant
FileItem style variant. Defaults to file.
-
Note: This table does not include native DOM and React properties like `onClick`, `ref`, `id`, `aria-label` (and many others) supported by this component.

Variants

The `variant` prop allows you to display different file types, such as a standard file or an image preview.

file Variant

log.pdf

200 KB

log.pdf

200 KB

image Variant

avatar.jpg

Embeded

Component can be used in embeded mode for scenarios such as file attached which are yet to be uploaded.

Embeded

log.pdf

200 KB

log.pdf

200 KB

Non-Embeded

log.pdf

200 KB

log.pdf

200 KB