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

# Split Layout Styling

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

Split Layout supports the following style variants:

| Variant   | Description                         | Supported by |
| --------- | ----------------------------------- | ------------ |
| `small`   | Makes the visual divider smaller    | Aura, Lumo   |
| `minimal` | Hides the visual divider completely | Lumo         |

### <a id="small"></a>Small

The `small` theme variant makes the visual divider smaller, giving more space to the content areas.

Please note that this variant shows the split handle only on hover, which isn’t ideal for touch devices.

**Lit** — `split-layout-theme-small.ts`

```html
<vaadin-split-layout style="max-height: 280px;" theme="small">
  <master-content></master-content>
  <detail-content></detail-content>
</vaadin-split-layout>
```

**Flow** — `SplitLayoutThemeVariants.java`

```java
MasterContent master = new MasterContent();
DetailContent detail = new DetailContent();

SplitLayout splitLayout = new SplitLayout(master, detail);
splitLayout.addThemeVariants(SplitLayoutVariant.SMALL);
```

**React** — `split-layout-theme-small.tsx`

```tsx
<SplitLayout style={{ maxHeight: '280px' }} theme="small">
  <MasterContent />
  <DetailContent />
</SplitLayout>
```

### <a id="minimal"></a>Minimal

The `minimal` style variant hides the visual divider completely. When using this variant, it’s still recommended to somehow indicate the split between the two sides, for example by styling one side as a layer on top of the other.

Please note that this variant shows the split handle only on hover, which isn’t ideal for touch devices.

**Lit** — `split-layout-theme-minimal.ts`

```html
<vaadin-split-layout style="max-height: 280px;" theme="minimal">
  <master-content></master-content>
  <detail-content></detail-content>
</vaadin-split-layout>
```

**Flow** — `SplitLayoutMinimalThemeVariants.java`

```java
MasterContent master = new MasterContent();
DetailContent detail = new DetailContent();

SplitLayout splitLayout = new SplitLayout(master, detail);
splitLayout.addThemeVariants(SplitLayoutVariant.LUMO_MINIMAL);
```

**React** — `split-layout-theme-minimal.tsx`

```tsx
<SplitLayout style={{ maxHeight: '280px' }} theme="minimal">
  <MasterContent />
  <DetailContent />
</SplitLayout>
```

## <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-split-layout-handle-background`    | Aura, Lumo   |
| `--vaadin-split-layout-handle-size`          | Aura, Lumo   |
| `--vaadin-split-layout-handle-target-size`   | Aura, Lumo   |
| `--vaadin-split-layout-splitter-background`  | Aura, Lumo   |
| `--vaadin-split-layout-splitter-size`        | Aura, Lumo   |
| `--vaadin-split-layout-splitter-target-size` | 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-split-layout`

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

- Horizontal split

  `vaadin-split-layout[orientation="horizontal"]`

- Vertical split

  `vaadin-split-layout[orientation="vertical"]`

- Focused splitter

  `vaadin-split-layout[focused]`

- Keyboard focused splitter

  `vaadin-split-layout[focus-ring]`

### <a id="parts"></a>Parts

- Splitter bar

  `vaadin-split-layout::part(splitter)`

- Splitter drag handle

  `vaadin-split-layout::part(handle)`

- Splitter visual handle

  `vaadin-split-layout::part(handle)::after`

- First content

  `vaadin-split-layout > [slot="primary"]`

- Second content

  `vaadin-split-layout > [slot="secondary"]`
