Angular Splitter - SplitterItem

A splitter item (pane).

Type:

Object

collapsed

Specifies whether an item (pane) is initially collapsed.

Type:

Boolean

Default Value: false
NOTE
Splitter should have at least one non-collapsed pane without a set size.

collapsedSize

Specifies the size of a collapsible item (pane) when collapsed in pixels or as a percentage.

Type:

Number

|

String

| undefined
Default Value: undefined
app.component.html
  • <dx-splitter ... >
  • <dxi-splitter-item ...
  • collapsedSize="20px"
  • >
  • </dxi-splitter-item>
  • </dx-splitter>
NOTE
The collapsedSize value must not exceed maxSize or be less then minSize.

View Demo

collapsible

Specifies whether an item (pane) is collapsible.

Type:

Boolean

Default Value: false

Splitter with collapsible panes

To collapse a pane, you can also double-click the separator bar.

NOTE
Splitter should have at least one non-collapsed pane without a set size.

View Demo

maxSize

Specifies the maximum size of an item (pane) in pixels or as a percentage.

Type:

Number

|

String

| undefined
Default Value: undefined
app.component.html
  • <dx-splitter ... >
  • <dxi-splitter-item ...
  • maxSize="500px"
  • >
  • </dxi-splitter-item>
  • </dx-splitter>

View Demo

minSize

Specifies the minimum size of an item (pane) in pixels or as a percentage.

Type:

Number

|

String

| undefined
Default Value: undefined
app.component.html
  • <dx-splitter ... >
  • <dxi-splitter-item ...
  • minSize="30%"
  • >
  • </dxi-splitter-item>
  • </dx-splitter>

View Demo

resizable

Specifies whether an item (pane) is resizable.

Type:

Boolean

Default Value: true

size

Specifies the initial size of an item (pane) in pixels or as a percentage of the component's total size. The Splitter initializes panes with equal sizes when this property is undefined (default).

Type:

Number

|

String

| undefined
Default Value: undefined

Splitter preserves configured pane sizes across UI layout changes. If you update the component layout programmatically (modify an item's size property using option()), Splitter recalculates the sizes of all panes. This may shift the entire component layout. To prevent unintended changes to other panes, define size for every pane and reassign all pane sizes when you update the layout.

NOTE
  • Specify minSize and maxSize to limit pane sizes.
  • Ensure the combined size of all panes does not exceed Splitter dimensions to avoid truncated or hidden pane content.
app.component.html
  • <dx-splitter>
  • <dxi-splitter-item
  • size="50%"
  • ></dxi-splitter-item>
  • </dx-splitter>

View Demo

splitter

Specifies a splitter inside an item (pane).

Type: dxSplitter_Options | undefined
Default Value: undefined

Use this property to make the item a nested Splitter UI component.

Splitter with a nested splitter

app.component.html
  • <dx-splitter id="splitter" orientation="vertical">
  • <dxi-splitter-item text="Top Panel"></dxi-splitter-item>
  • <dxi-splitter-item>
  • <dx-splitter>
  • <dxi-splitter-item text="Nested Left Panel"></dxi-splitter-item>
  • <dxi-splitter-item text="Nested Central Panel"></dxi-splitter-item>
  • <dxi-splitter-item text="Nested Right Panel"></dxi-splitter-item>
  • </dx-splitter>
  • </dxi-splitter-item>
  • </dx-splitter>

View Demo

template

Specifies a template that should be used to render this item only.

Type:

template

Template Data:

CollectionWidgetItem

The item object to be rendered.

For more information about templates, refer to the following help topic: DevExtreme Angular - Custom Templates.

app.component.html
app.component.ts
app.module.ts
  • <dx-splitter ... >
  • <dxi-splitter-item ... >
  • <div *dxTemplate>
  • <div>Custom Item</div>
  • </div>
  • </dxi-splitter-item>
  • </dx-splitter>
  • import { Component } from '@angular/core';
  •  
  • @Component({
  • selector: 'app-root',
  • templateUrl: './app.component.html',
  • styleUrls: ['./app.component.css']
  • })
  • export class AppComponent {
  • // ...
  • }
  • import { BrowserModule } from '@angular/platform-browser';
  • import { NgModule } from '@angular/core';
  • import { AppComponent } from './app.component';
  •  
  • import { DxSplitterModule } from 'devextreme-angular';
  •  
  • @NgModule({
  • declarations: [
  • AppComponent
  • ],
  • imports: [
  • BrowserModule,
  • DxSplitterModule
  • ],
  • providers: [ ],
  • bootstrap: [AppComponent]
  • })
  • export class AppModule { }
See Also

text

Specifies text displayed for the UI component item.

Type:

String

If you use both this property and a template, the template overrides the text.

visible

Specifies whether or not a UI component item must be displayed.

Type:

Boolean

Default Value: true

When you set this property to true at runtime, displayed pane size becomes 0. Update other pane sizes to display the pane.