> Markdown version of [Styling](https://vaadin.com/docs/next/components/upload/styling). Section index: [llms.txt](https://vaadin.com/docs/next/components/llms.txt)

# Upload Styling

## <a id="style-variants"></a>Style Variants

Upload supports the following style variants:

| Variant      | Description                                                                                               | Supported by |
| ------------ | --------------------------------------------------------------------------------------------------------- | ------------ |
| `no-border`  | Removes border around the upload component                                                                | Aura         |
| `thumbnails` | Displays file list items as a compact grid with thumbnail previews for images. Apply to `UploadFileList`. | Aura, Lumo   |

## <a id="style-properties"></a>Style Properties

The following style properties can be used in CSS stylesheets to customize the appearance of this component.

To apply values to these properties globally in your application UI, place them in a CSS block using the `html {…​}` selector. See [Component Style Properties](https://vaadin.com/docs/next/styling/styling-components.md#component-style-properties) for more information on style properties.

### <a id="upload-properties"></a>Upload Properties

| Property                                 | Supported by |
| ---------------------------------------- | ------------ |
| `--vaadin-upload-background`             | Aura, Lumo   |
| `--vaadin-upload-border-color`           | Aura, Lumo   |
| `--vaadin-upload-border-radius`          | Aura, Lumo   |
| `--vaadin-upload-border-width`           | Aura, Lumo   |
| `--vaadin-upload-drop-label-color`       | Aura, Lumo   |
| `--vaadin-upload-drop-label-font-size`   | Aura, Lumo   |
| `--vaadin-upload-drop-label-font-weight` | Aura, Lumo   |
| `--vaadin-upload-drop-label-gap`         | Aura, Lumo   |
| `--vaadin-upload-drop-label-line-height` | Aura, Lumo   |
| `--vaadin-upload-gap`                    | Aura, Lumo   |
| `--vaadin-upload-icon-color`             | Aura         |
| `--vaadin-upload-padding`                | Aura, Lumo   |

### <a id="file-list-properties"></a>File List Properties

| Property                                  | Supported by |
| ----------------------------------------- | ------------ |
| `--vaadin-upload-file-list-divider-color` | Aura, Lumo   |
| `--vaadin-upload-file-list-divider-width` | Aura, Lumo   |

### <a id="file-properties"></a>File Properties

| Property                                    | Supported by |
| ------------------------------------------- | ------------ |
| `--vaadin-upload-file-border-radius`        | Aura, Lumo   |
| `--vaadin-upload-file-button-background`    | Aura, Lumo   |
| `--vaadin-upload-file-button-border-color`  | Aura         |
| `--vaadin-upload-file-button-border-radius` | Aura         |
| `--vaadin-upload-file-button-border-width`  | Aura         |
| `--vaadin-upload-file-button-text-color`    | Aura         |
| `--vaadin-upload-file-button-padding`       | Aura         |
| `--vaadin-upload-file-done-color`           | Aura         |
| `--vaadin-upload-file-error-color`          | Aura         |
| `--vaadin-upload-file-error-font-size`      | Aura         |
| `--vaadin-upload-file-error-font-weight`    | Aura         |
| `--vaadin-upload-file-error-line-height`    | Aura         |
| `--vaadin-upload-file-gap`                  | Aura, Lumo   |
| `--vaadin-upload-file-name-color`           | Aura         |
| `--vaadin-upload-file-name-font-size`       | Aura         |
| `--vaadin-upload-file-name-font-weight`     | Aura         |
| `--vaadin-upload-file-name-line-height`     | Aura         |
| `--vaadin-upload-file-padding`              | Aura, Lumo   |
| `--vaadin-upload-file-status-color`         | Aura         |
| `--vaadin-upload-file-status-font-size`     | Aura         |
| `--vaadin-upload-file-status-font-weight`   | Aura         |
| `--vaadin-upload-file-status-line-height`   | Aura         |
| `--vaadin-upload-file-warning-color`        | Aura         |

## <a id="css-selectors"></a>CSS Selectors

The following CSS selectors can be used in stylesheets to target the various parts and states of the component. See the [Styling documentation](https://vaadin.com/docs/next/styling.md) for more details on how to style components.

> **Important: Not for Shadow DOM**
>
> These selectors should be used in `styles.css` or another stylesheet loaded with the `@StyleSheet` annotation or the `@import` CSS rule. **They do not work in the shadow DOM of Vaadin components**, such as in stylesheets in the `components` sub-folder or loaded with the `@CssImport` annotation’s `themeFor` property.

---

- Root element

  `vaadin-upload`

### <a id="states"></a>States

- Upload with drop area disabled

  `vaadin-upload[nodrop]`

- Upload with file dragged over

  `vaadin-upload[dragover]`

- Upload with file dragged over and validated

  `vaadin-upload[dragover-valid]`

### <a id="button-and-drop-label"></a>Button and Drop Label

- Button and drop label wrapper

  `vaadin-upload::part(primary-buttons)`

- Upload button

  `vaadin-upload > vaadin-button`

- Upload button text

  `vaadin-upload > vaadin-button::part(label)`

- Hovered button

  `vaadin-upload > vaadin-button:hover`

- Focused button

  `vaadin-upload > vaadin-button[focused]`

- Disabled button

  `vaadin-upload > vaadin-button[disabled]`

- Drop label

  `vaadin-upload::part(drop-label)`

- Drop label text

  `vaadin-upload > [slot="drop-label"]`

- Drop label icon wrapper

  `vaadin-upload > [slot="drop-label-icon"]`

- Drop label icon

  `vaadin-upload > [slot="drop-label-icon"]::before`

### <a id="file-list"></a>File List

- File list wrapper

  `vaadin-upload-file-list`

- File list

  `vaadin-upload-file-list::part(list)`

### <a id="file"></a>File

- File element

  `vaadin-upload-file`

- Meta information wrapper

  `vaadin-upload-file::part(meta)`

- File name

  `vaadin-upload-file::part(name)`

- Status text

  `vaadin-upload-file::part(status)`

- Error message

  `vaadin-upload-file::part(error)`

#### <a id="file-states"></a>File States

- Focused file

  `vaadin-upload-file[focused]`

- Keyboard focused file

  `vaadin-upload-file[focus-ring]`

- Hovered file

  `vaadin-upload-file:hover`

- File uploaded successfully

  `vaadin-upload-file[complete]`

- File that failed with an error

  `vaadin-upload-file[error]`

- File with upload in progress

  `vaadin-upload-file[uploading]`

- File with unknown remaining time estimate

  `vaadin-upload-file[indeterminate]`

- Icon: upload completed

  `vaadin-upload-file::part(done-icon)`

- Icon: upload failed

  `vaadin-upload-file::part(warning-icon)`

#### <a id="file-actions"></a>File Actions

- Actions wrapper

  `vaadin-upload-file::part(commands)`

- Start upload button

  `vaadin-upload-file::part(start-button)`

- Retry button

  `vaadin-upload-file::part(retry-button)`

- Remove button

  `vaadin-upload-file::part(remove-button)`

#### <a id="progress-bar"></a>Progress Bar

- Progress bar element

  `vaadin-upload-file > vaadin-progress-bar`

- Progress bar track

  `vaadin-upload-file > vaadin-progress-bar::part(bar)`

- Progress bar indicator

  `vaadin-upload-file > vaadin-progress-bar::part(value)`

- Indeterminate progress bar (unknown estimate)

  `vaadin-upload-file > vaadin-progress-bar[indeterminate]`

## <a id="modular-upload-components"></a>Modular Upload Components

The [modular upload](https://vaadin.com/docs/next/components/upload/modular-upload.md) components (`UploadButton`, `UploadDropZone`, `UploadFileList`) can be styled independently. The File List and File properties and selectors documented above apply equally to the standalone `UploadFileList` component.

### <a id="upload-button"></a>Upload Button

`UploadButton` (`vaadin-upload-button`) is styled the same as a regular [Button](https://vaadin.com/docs/next/components/button/styling.md) component. It supports the same style variants, CSS custom properties, and CSS selectors.

- Root element

  `vaadin-upload-button`

#### <a id="states-2"></a>States

- Disabled

  `vaadin-upload-button[disabled]`

- Focused

  `vaadin-upload-button[focused]`

- Keyboard focused

  `vaadin-upload-button[focus-ring]`

- Maximum files reached

  `vaadin-upload-button[max-files-reached]`

- With tooltip

  `vaadin-upload-button[has-tooltip]`

### <a id="upload-drop-zone"></a>Upload Drop Zone

`UploadDropZone` (`vaadin-upload-drop-zone`) is intentionally unstyled. It serves as a functional container that wraps your own content. A semi-transparent overlay is shown during drag-over to indicate the drop target.

- Root element

  `vaadin-upload-drop-zone`

#### <a id="states-3"></a>States

- File dragged over

  `vaadin-upload-drop-zone[dragover]`

- Disabled

  `vaadin-upload-drop-zone[disabled]`

- Maximum files reached

  `vaadin-upload-drop-zone[max-files-reached]`

### <a id="upload-file-list"></a>Upload File List

`UploadFileList` (`vaadin-upload-file-list`) uses the same `vaadin-upload-file` child elements as the standard Upload component. The [File List Properties](#file-list-properties), [File Properties](#file-properties), [File List](#file-list), [File](#file), [File States](#file-states), [File Actions](#file-actions), and [Progress Bar](#progress-bar) sections above all apply.

- Root element

  `vaadin-upload-file-list`
