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

# Virtual List Styling

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

Virtual List supports the following style variants:

| Variant                     | Description                                                                | Supported by |
| --------------------------- | -------------------------------------------------------------------------- | ------------ |
| `overflow-indicators`       | Shows visual indicators at the top and bottom when the content is scrolled | Aura, Lumo   |
| `overflow-indicator-top`    | Shows visual indicator at the top when the content is scrolled             | Aura, Lumo   |
| `overflow-indicator-bottom` | Shows visual indicator at the bottom when the content is scrolled          | Aura, Lumo   |

> **Tip: Virtual List Padding**
>
> Do not set `padding` to the virtual list when using these variants, as it prevents the borders from appearing in the correct positions. Use `--vaadin-virtual-list-padding-block` and `--vaadin-virtual-list-padding-inline` properties instead.

## <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.

| Property                                          | Supported by |
| ------------------------------------------------- | ------------ |
| `--vaadin-virtual-list-padding-block`             | Aura, Lumo   |
| `--vaadin-virtual-list-padding-inline`            | Aura, Lumo   |
| `--vaadin-virtual-list-overflow-indicator-color`  | Aura, Lumo   |
| `--vaadin-virtual-list-overflow-indicator-height` | Aura, Lumo   |

## <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-virtual-list`

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

- Content overflow at bottom

  `vaadin-virtual-list[overflow~="bottom"]`

- Content overflow at top

  `vaadin-virtual-list[overflow~="top"]`

- Content overflow start (left)

  `vaadin-virtual-list[overflow~="start"]`

- Content overflow end (right)

  `vaadin-virtual-list[overflow~="end"]`
