Represents the React Splitter Component
<Splitter></Splitter>
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 ”
boolean
Defines whether to allow the cross-scripting site or not.
Defaults to true
boolean
Enables or disables the persisting component’s state between page reloads.
Defaults to false
boolean
Specifies the value whether splitter panes are reordered or not .
Defaults to true
boolean
Enable or disable rendering component in right to left direction.
Defaults to false
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
string
Specifies the height of the Splitter component that accepts both string and number values.
Defaults to ‘100%’
string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ”
Specifies a value that indicates whether to align the split panes horizontally or vertically.
import { render } from "react-dom";
import * as React from "react";
import { SampleBase } from "./sample-base";
import { SplitterComponent, PanesDirective, PaneDirective } from "@syncfusion/ej2-react-layouts";
export class Basic extends SampleBase<{}, {}> {
public paneContent1(): void {
return <div>Left pane</div>;
}
public paneContent2(): void {
return <div> Right pane</div>;
}
}
public render(): JSX.Element {
return (
<SplitterComponent orientation="Vertical" height="100px">
<PanesDirective>
<PaneDirective content={this.paneContent1} />
<PaneDirective content={this.paneContent2} />
</PanesDirective>
</SplitterComponent>
);
}
}
Defaults to Horizontal
Configures the individual pane behaviors such as content, size, resizable, minimum, maximum validation, collapsible and collapsed.
import { render } from "react-dom";
import * as React from "react";
import { SampleBase } from "./sample-base";
import { SplitterComponent } from "@syncfusion/ej2-react-layouts";
export class Basic extends SampleBase<{}, {}> {
public paneSettings = [{collapsible: false , content : 'Left pane' , size : '30%'},{collapsible : true , content : 'Right pane' , size : '75%'}];
}
public render(): JSX.Element {
return (
<SplitterComponent paneSettings={this.paneSettings} height="100px"></SplitterComponent>
);
}
}
Defaults to []
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
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%’
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
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
Removes the control from the DOM and also removes all its related events.
Returns void
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
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
EmitType<BeforeExpandEventArgs>
Triggers when before panes get collapsed.
EmitType<BeforeExpandEventArgs>
Triggers when before panes get expanded.
EmitType<BeforeSanitizeHtmlArgs>
Event triggers before sanitize the value.
Triggers when after panes get collapsed.
EmitType<Object>
Triggers after creating the splitter component with its panes.
Triggers when after panes get expanded.
Triggers when the split pane is started to resize.
Triggers when the resizing of split pane is stopped.
Triggers when a split pane is being resized.