File uploader
Color
Element | Property | Color token |
---|---|---|
Heading | text-color |
|
Description | text-color |
|
Button | See primary button | |
Drop zone text | text-color |
|
Drop zone container | border |
|
File name | text-color |
|
File container | background-color |
|
Delete icon | svg |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Examples of file loader](/static/fb69d0a17f6ab05ba57b5da0fdcff34a/3cbba/file-uploader-style-1.png)
Interactive states
State | Element | Property | Color token |
---|---|---|---|
Hover | Drop zone text | text-color |
|
Drop zone container | border |
| |
Focus | Delete icon | border |
|
Drop zone container | border |
| |
Loading | Loader | See inline loading | |
Uploaded | Checkmark icon | svg |
|
Invalid | File | border |
|
Error title | text-color |
| |
Error message | text-color |
| |
Warning icon | svg |
| |
Divider | border-top |
| |
Disabled | Label | text-color |
|
Description | text-color |
| |
Drop zone text | text-color |
|
![Examples of file loader file states](/static/d1e8cfe2bcbc1d9d5f3939e69a238332/3cbba/file-uploader-style-2.png)
Selected file states: loading, complete, focus, invalid.
![Examples of drag and drop file uploader states](/static/095c7b2cf5a0e7acaa414e50883fe6b0/3cbba/file-uploader-style-3.png)
Drag and drop file uploader states.
Typography
The file uploader label and description text should be set in sentence case, with only the first letter of the first word in the sentence capitalized.
Element | Font-size (px/rem) | Font-weight | Type token |
---|---|---|---|
Heading | 14 / 0.875 | SemiBold / 600 |
|
Description | 14 / 0.875 | Regular / 400 |
|
Error message | 12 / 0.75 | Regular / 400 |
|
Drop zone text | 14 / 0.875 | Regular / 400 |
|
File name | 14 / 0.875 | Regular / 400 |
|
Structure
The width of an uploaded file varies based on the content and layout of a design.
Element | Property | px / rem | Spacing token |
---|---|---|---|
File | width | 288 / 18 | – |
padding-left | 16 / 1 |
| |
margin-bottom | 8 / 0.5 |
| |
padding-right | 16 / 1 |
| |
Delete icon | height, width | 16 / 1 | – |
margin-left, margin-right | 16 / 1 |
| |
Button | See primary button |
![Structure and spacing measurements for file uploader](/static/102f972fb29210e1a512aa79f8777841/3cbba/file-uploader-style-4.png)
Structure and spacing measurements for file uploader | px / rem
![Structure and spacing measurements for drag and drop with multiple file upload functionality](/static/3860e0b9ddd3aee1a30d7d263e294919/3cbba/file-uploader-style-5.png)
Structure and spacing measurements for drag and drop with multiple file upload functionality | px / rem
![Structure and spacing measurements for drag and drop with single file upload functionality](/static/2bb08b8ec096efef92d3cbb87bb87cdc/3cbba/file-uploader-style-7.png)
Structure and spacing measurements for drag and drop with single file upload functionality | px / rem
Sizes
The file and button heights should always match.
Element | Size | Height px / rem |
---|---|---|
File | Small (sm) | 32 / 2 |
Medium (md) | 40 / 2.5 | |
Large (lg) | 48 / 3 | |
Button | Small (sm) | 32 / 2 |
Medium (md) | 40 / 2.5 | |
Large (lg) | 48 / 3 |
![Sizes for file and button](/static/0bbecbb0faa0bcf8f847e69715977761/3cbba/file-uploader-style-size.png)
File and button sizes | px / rem