Components

Attachment Input

An input for handling photo, video, and file attachments, managing selection, upload, progress, failure, and delete states.

FigmaReactAndroid
Attachment Input cover image

Anatomy

Attachment Input consists of a Trigger and a Preview; the Preview can display actions on an item (delete/retry) and the upload progress state.

Anatomy image of Attachment Input. Consists of Trigger, Delete Button, Preview, Loading State, and Retry Button.

Properties

Variant

Attachment Input consists of a Media type for attaching photos/videos and a File type for attaching files.

Attachment Input Variant - Media, File

Preview Badge

A badge can be shown on a Preview item. Mainly used to show a "cover photo" badge on the first Preview.

  • The badge is shown as a semi-transparent overlay at the bottom of the thumbnail.
  • The badge label can be changed.

Example of Attachment Input Preview Badge

State

Trigger and Preview each have different states.

  • Trigger: Has Enabled, Pressed, and Disabled states; when it has a value, the Count is shown in the Neutral color.
  • Preview: Has Enabled, Loading, Error, and Disabled states.
  • Remove Button: The delete button at the top right of the Preview, with its own Enabled, Pressed, and Disabled states.

Example of Attachment Input Trigger's Enabled, Has Value, Pressed, Disabled states

Example of Attachment Input Preview's Enabled, Loading, Error, Disabled, Dragging states

Example of Attachment Input Remove Button's Enabled, Pressed, Disabled states

Dropzone

An area where files can be uploaded via drag and drop. Used together with the existing Trigger button, and visually clearly indicates the droppable area.

  • Files can be selected either by clicking the button or by drag and drop.
  • When dragging in, the area's border and background color change to show the active state.
  • After selecting files, the Preview is shown inline below the Dropzone.

Example of Attachment Input Dropzone's Enabled, Dragging Over, and after file attachment states

Reorder

When the Reorderable option is enabled, you can drag Preview items to change their order.

Example of Attachment Input Reorder

Specification

Attachment Input

base

StateSlotPropertyValue
enabledrootgap
itemsgap

Attachment Input Trigger

base

StateSlotPropertyValue
enabledrootsize
gap
color
cornerRadius
strokeWidth
strokeColor
iconsize
color
itemCountcolor
fontWeight
fontSize
lineHeight
maxItemCountcolor
fontWeight
fontSize
lineHeight
pressedrootcolor
scaleScope
disablediconcolor
itemCountcolor
maxItemCountcolor

Attachment Input Item

base

StateSlotPropertyValue
enabledrootheight
color
cornerRadius
strokeWidth
gap
thumbnailcolor
size
cornerRadius
thumbnailIconcolor
size
namecolor
fontSize
lineHeight
fontWeight
sizecolor
fontSize
lineHeight
fontWeight
removeButtonMaskoffset
size
pressedrootscaleScope

type=file

StateSlotPropertyValue
enabledrootwidth
strokeColor
paddingX
readonlythumbnailIconcolor
namecolor
sizecolor
draggingthumbnailIconcolor
namecolor
sizecolor

type=image

StateSlotPropertyValue
enabledrootwidth
strokeColor
backdropcolor
badgecolor
height
cornerRadius
paddingX
badgeLabelcolor
fontSize
lineHeight
fontWeight
readonlyrootopacity
draggingrootopacity

Attachment Input Item Action Button

base

StateSlotPropertyValue
enabledrootgap
iconsize
labelfontSize
lineHeight
fontWeight
pressedrootscaleScope

type=file

StateSlotPropertyValue
enablediconcolor
labelcolor

type=image

StateSlotPropertyValue
enablediconcolor
labelcolor

Attachment Input Item Remove Button

base

StateSlotPropertyValue
enabledrootsize
cornerRadius
color
strokeWidth
strokeColor
offset
iconsize
color
pressedrootcolor
scaleScope
disablediconcolor

Attachment Input Dropzone

base

StateSlotPropertyValue
enabledrootheight
gap
paddingX
cornerRadius
strokeWidth
strokeColor
labelcolor
fontSize
lineHeight
fontWeight
draggingOverrootstrokeColor
disabledlabelcolor

Table of contents