Search results

Splitter

Splitter is a layout user interface (UI) control that has resizable and collapsible split panes. The container can be split into multiple panes, which are oriented horizontally or vertically. The separator (divider) splits the panes and resizes and expands/collapses the panes. The splitter is placed inside the split pane to make a nested layout user interface.

<div id="splitter">
 <div> Left Pane </div>
 <div> Center Pane </div>
 <div> Right Pane </div>
</div>
<script>
  var splitterObj = new Splitter({ width: '300px', height: '200px'});
  splitterObj.appendTo('#splitter');
</script>

Properties

cssClass

string

Specifies the CSS class names that defines specific user-defined styles and themes to be appended on the root element of the Splitter. It is used to customize the Splitter control. One or more custom CSS classes can be specified to the Splitter.

Defaults to

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

enabled

boolean

Specifies boolean value that indicates whether the component is enabled or disabled. The Splitter component does not allow to interact when this property is disabled.

Defaults to true

height

string

Specifies the height of the Splitter component that accepts both string and number values.

Defaults to ‘100%’

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to

orientation

string

Specifies a value that indicates whether to align the split panes horizontally or vertically.

  • Set the orientation property as “Horizontal” to create a horizontal splitter that aligns the panes left-to-right.
  • Set the orientation property as “Vertical” to create a vertical splitter that aligns the panes top-to-bottom.

Defaults to Horizontal

paneSettings

PanePropertiesModel[]

Configures the individual pane behaviors such as content, size, resizable, minimum, maximum validation, collapsible and collapsed.

Defaults to []

separatorSize

number

Specifies the size of the separator line for both horizontal or vertical orientation. The separator is used to separate the panes by lines.

Defaults to null

width

string

Specifies the width of the Splitter control, which accepts both string and number values as width. The string value can be either in pixel or percentage format.

Defaults to ‘100%’

Methods

addEventListener

Adds the handler to the given event listener.

Returns void

addPane

Allows you to add a pane dynamically to the specified index position by passing the pane properties.

Parameter Type Description
paneProperties PanePropertiesModel Specifies the pane’s properties that apply to new pane.
index number Specifies the index where the pane will be inserted.

Returns void

appendTo

Appends the control within the given HTML element

Parameter Type Description
selector (optional) string | HTMLElement Target element where control needs to be appended

Returns void

collapse

collapses corresponding pane based on the index is passed.

Parameter Type Description
index number Specifies the index value of the corresponding pane to be collapsed at initial rendering of splitter.

Returns void

dataBind

When invoked, applies the pending property changes immediately to the component.

Returns void

destroy

Removes the control from the DOM and also removes all its related events.

Returns void

expand

expands corresponding pane based on the index is passed.

Parameter Type Description
index number Specifies the index value of the corresponding pane to be expanded at initial rendering of splitter.

Returns void

refresh

Applies all the pending property changes and render the component again.

Returns void

removeEventListener

Removes the handler from the given event listener.

Returns void

removePane

Allows you to remove the specified pane dynamically by passing its index value.

Parameter Type Description
index number Specifies the index value to remove the corresponding pane.

Returns void

Inject

Dynamically injects the required modules to the component.

Returns void

Events

beforeCollapse

EmitType<BeforeExpandEventArgs>

Triggers when before panes get collapsed.

beforeExpand

EmitType<BeforeExpandEventArgs>

Triggers when before panes get expanded.

collapsed

EmitType<ExpandedEventArgs>

Triggers when after panes get collapsed.

created

EmitType<Object>

Triggers after creating the splitter component with its panes.

expanded

EmitType<ExpandedEventArgs>

Triggers when after panes get expanded.

resizeStart

EmitType<ResizeEventArgs>

Triggers when the split pane is started to resize.

resizeStop

EmitType<ResizingEventArgs>

Triggers when the resizing of split pane is stopped.

resizing

EmitType<ResizingEventArgs>

Triggers when a split pane is being resized.