# Panes

The Splitter component divides content into resizable sections called panes. Each pane can contain different content and be configured independently to create flexible, user-customizable layouts.

You can control the following aspects of Splitter panes:

* [Dimensions](https://www.telerik.com/kendo-angular-ui-develop/components/layout/splitter/panes#dimensions)—Set initial sizes and size constraints.
* [Resizing](https://www.telerik.com/kendo-angular-ui-develop/components/layout/splitter/panes#resizing)—Enable or disable user resizing.
* [Collapsing](https://www.telerik.com/kendo-angular-ui-develop/components/layout/splitter/panes#collapsing)—Allow panes to be hidden and shown.
* [Scrolling](https://www.telerik.com/kendo-angular-ui-develop/components/layout/splitter/panes#scrolling)—Control content overflow behavior.
* [Customizing Split Bars](https://www.telerik.com/kendo-angular-ui-develop/components/layout/splitter/panes#customizing-split-bars)—Add attributes and classes to the split bars next to specific panes.
* [Persisting Pane State](https://www.telerik.com/kendo-angular-ui-develop/components/layout/splitter/panes#persisting-pane-state)—Save user preferences across sessions.

## Dimensions

The [`size`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#size) property controls the dimensions of the Splitter panes. To control the minimum and maximum size of a pane, use the [`min`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#min) and [`max`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#max) properties of the SplitterPane component. The `min`, `max` and `size` properties accept units in both pixel and percentage values.

To let the Splitter evenly distribute the available space between panes of non-declared size, leave the size of one or more panes unspecified. Otherwise, if you declare `size` for all panes, the Splitter will throw an error in development mode.

The following example demonstrates how to specify the dimensions of the Splitter panes.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/splitter/panes/source.txt)

## Resizing

By default, the Splitter lets users resize its panes. To turn off this behavior, set the [`resizable`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#resizable) property to `false`.

The following example demonstrates how to disable the resizing feature of the Splitter panes.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/splitter/panes/resize/source.txt)

## Collapsing

You can let a Splitter pane collapse by setting the [`collapsible`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#collapsible) property to `true`. As a result, the Splitter renders a button which shows or hides the pane. To collapse a pane, you can also double-click the split-bar. To render a pane that starts collapsed, use the [`collapsed`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#collapsed) property.

The following example shows how to collapse a pane by using the `collapsible` property. Click the **Collapse** button to collapse the left pane, or double-click the split-bar between the panes.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/splitter/panes/collapsing/source.txt)

## Scrolling

By default, the content of the Splitter panes is scrollable. To turn off the scrolling feature, set the [`scrollable`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#scrollable) property to `false`.

The following example demonstrates how to disable the scrolling feature of the Splitter panes.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/splitter/panes/scrolling/source.txt)

## Customizing Split Bars

You can customize the split bar that follows a pane by using the pane-level [`splitterBarAttributes`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#splitterbarattributes) and [`splitterBarClass`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#splitterbarclass) properties. Use these options when a specific split bar needs different attributes or styling from the rest of the Splitter.

The following example shows a three-pane layout where both split bars are customized with a CSS class for distinct visual styling and HTML attributes for accessibility and testing hooks. Hover over a split bar to see the custom tooltip text.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/splitter/panes/splitbar_attributes/source.txt)

### Adding HTML Attributes

Use the `splitterBarAttributes` property to add HTML attributes to the split bar next to a pane. This option is useful for values such as `title`, `aria-label`, and testing hooks.

```html
<kendo-splitter-pane [splitterBarAttributes]="navBarAttributes">
    ...
</kendo-splitter-pane>
```

```typescript
public navBarAttributes: Record<string, string> = {
    title: 'Resize or collapse the navigation pane',
    'aria-label': 'Navigation pane separator',
    'data-testid': 'nav-splitbar',
};
```

### Applying CSS Classes

Use the `splitterBarClass` property to apply CSS classes to the split bar next to a pane. This option is useful when one split bar needs different styling from the rest. To apply the same classes to all split bars, use the [`splitterBarClass`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splittercomponent#splitterbarclass) property on the Splitter component.

```html
<kendo-splitter-pane splitterBarClass="nav-splitbar">
    ...
</kendo-splitter-pane>
```

```css
.nav-splitbar {
    background: color-mix(in srgb, var(--kendo-color-primary) 18%, var(--kendo-color-surface-alt));
    border-inline: 1px solid color-mix(in srgb, var(--kendo-color-primary) 40%, transparent);
}

.nav-splitbar .k-resize-handle {
    background: var(--kendo-color-primary);
}
```

## Persisting Pane State

To persist the pane state, including both size and collapse state, bind to the relevant properties and store their values in a persistent storage solution. For the [`size`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#size) property, use [two-way binding](https://angular.dev/guide/templates/two-way-binding) with a getter/setter pattern to automatically persist changes. For the `collapsed` property, use event handling with the [`collapsedChange`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent#collapsedchange) event. This approach lets users maintain their preferred layout across application sessions.

The following demo shows persistence for both pane size and collapse state by using two-way binding for size and handling the `collapsedChange` event. The demo stores values in [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). Modify the panes and reload the page to see the state persistence in action.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/splitter/panes/persist_size/source.txt)

## Suggested Links

* [API Reference of the Splitter](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splittercomponent)
* [API Reference of the SplitterPaneComponent](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/splitterpanecomponent)
