ImageAndFileDisplay
Display images and files with labels, descriptions, and optional remove button
Source
Docs
Package
Usage
ImageAndFileDisplay
is a component for displaying images and files with labels, descriptions, and optional remove button. It supports both horizontal and vertical orientations and can automatically show file sizes for file types.

Input description
With label
ImageAndFileDisplay
supports labels that can be positioned alongside the display. In horizontal orientation, the label appears to the right of the display. In vertical orientation, it appears below the display.
Description on the right
Description on the bottom
Display only
ImageAndFileDisplay
can be used without labels or descriptions for a minimal display.

Overlay
Add an overlay to the display using the overlay
prop.

Fullwidth (horizontal only)
When fullWidth
is set to true
(default), the component takes the full width of its container in horizontal orientation.

This is a description that is really long and take up a lot of space
Vertical orientation
Set orientation="vertical"
to stack the label and description below the display instead of beside it.

Description on the bottom

Description on the bottom

Description on the bottom
File format
ImageAndFileDisplay
can display file icons for different file formats. You can customize the file icon by providing a custom getFileIcon
function. Currently supports the following file formats:
pdf
xls
xlsx
doc
docx
txt
tiff
gif
Design pattern (vertical)
Common design pattern is to display a list of files in a vertical orientation with a limited number of files displayed at a time using FileButton
and a Collapse
component.
Description
7 B
7 B
7 B

2 MB
Design pattern (horizontal)
Another common design pattern is to display a list of files in a horizontal orientation with a limited number of files displayed at a time using FileButton
and a Collapse
component.
Description
Error
7 B
7 B
7 B

2 MB