<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5HGSQD2L" height="0" width="0" style="display:none;visibility:hidden" title="GTM"></iframe>

File Tile

A representation of a file such as an uploaded image or a template asset.
styleKeys: fileTile

Use File Tile...

  • To display user-initiated file uploads.
  • To show the upload progress and status of a file.

Don't use File Tile...

Default

The File Tile component is designed to display individual files.

The preview has been updated.

Skin

Use the skin prop to specify the state of the File Tile. The default is standard. Use queued for files that are waiting to be loaded. Use loading for files that are currently being loaded.

The preview has been updated.

Error

To show an error on a File Tile, set skin="error" and set an errorMessage. Ensure that a File Tile with an error is always wrapped in a FormField in order to access the form context.

The preview has been updated.

List

The default UI layout is layout="thumb" which displays the File Tile as a 1:1 square. Use layout="list" for a more condensed list view that stacks vertically.

The preview has been updated.

Thumbnail

If the file is an image, pass a ResponsiveImage as a child to the FileThumbnail. File Tile handles the aspect ratio of the image.

The preview has been updated.

Description

Use fileDescription to show the file size. e.g. 3.56 MB. It can also be used to show other metadata such as file dimensions. e.g. 600px x 400px.

The preview has been updated.

Deleting files

The FileTileDeleteButton subcomponent allows users to control the files they upload. This subcomponent is optional but recommended in most use cases.

Errors

If File Tile has skin="error" or an errorMessage, then it needs to be wrapped in a FormField component so that the form context exists. Pairing this with a File Dropzone will automatically pick up the errors from File Tile and apply them to the file input in the File Dropzone.

Props

FileTile
This component is implemented using the <div /> as the root element. You can utilize the native attributes supported by <div /> tag. The ref is directly assigned to the root element, allowing you to access and manipulate it as needed.
See core props for additional props that can be applied to this component.
proptyperequireddescriptiondefault
fileNamestringtrue
The name of the file
null
accessibleTextForProgressstringtrue
The localized accessible text for the Progress component
null
accessibleTextForSpinnerstringtrue
The localized accessible text for the Spinner component
null
skin"standard" | "loading" | "error" | "queued" | nullfalse
The visual style of the FileTile
null
errorMessagestring | nullfalse
Error message on file upload failure
null
fileDescriptionstring | nullfalse
The description of the file, could be file size or dimensions e.g. "3.56 MB" or "600x400"
null
layout"list" | "thumb" | nullfalse
The visual layout of the FileTile
null
progressValuenumber | nullfalse
The percentage of progress of the file upload
null
FileTileDeleteButton
This component is implemented using the <button /> as the root element. You can utilize the native attributes supported by <button /> tag. The ref is directly assigned to the root element, allowing you to access and manipulate it as needed.
See core props for additional props that can be applied to this component.
proptyperequireddescriptiondefault
accessibleTextstringtrue
The localized accessible text used for screen readers
null
FileTileThumbnail
This component is implemented using the <div /> as the root element. You can utilize the native attributes supported by <div /> tag. The ref is directly assigned to the root element, allowing you to access and manipulate it as needed.
See core props for additional props that can be applied to this component.