Split Panel
Split two content areas and drag the divider to resize them.
Usage guide
#Use to view and resize two regions at once, such as an explorer and editor. Layout is better for a fixed sidebar.
Place two regions
Use the
leftandrightslots, including for vertical splits. First ensure the parent has sufficient height.Set proportions and limits
ratiois the percentage occupied by the left or top region. Set the minimum percentage on both sides withminRatio.Connect resize results
Update the app's size state from the change event matching the direction.
Examples
#Feature examples
#Choose a feature from 8 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.
No matching features.
API reference
#Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.
<sy-split-panel>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
boolean | false | Prevent dragging and keyboard adjustment of the divider. | |
boolean | false | Hide the resize handle between panels. | |
number | 0 | Minimum percentage for each region. Valid range: 0–50. | |
number | 50 | Percentage occupied by the left or top region. | |
'horizontal' | 'vertical' | 'horizontal' | horizontal splits left and right; vertical splits top and bottom. |
Events
| Event | Detail | Description |
|---|---|---|
CustomEvent<{
leftRatio: number;
rightRatio: number;
}> | Read the result from the event's detail. | |
CustomEvent<{
topRatio: number;
bottomRatio: number;
}> | Read the result from the event's detail. |
Slots
| Slot | Description |
|---|---|
| Content displayed in the left area. | |
| Content displayed in the right area. |