Skip to main content

SplitView

shadow

The Split view element is a versatile component that allows you to create a split view with two or more sections. Provides a divider slider that allows you to dynamically resize sections. Two orientations are supported - vertical and horizontal, and nesting another SplitView to create more complex views.

Basic usage​

The sample represents split-view in its default split to make clear the behavior of two panels side by side.

Vertical SplitView​

Two orientations are supported. Add the vertical attribute to display a vertical SplitView.

Min/Max​

Adding the min and max properties with values "0" to "100" will limit the range of motion of the separator.

Disabled​

Adding the disabled attribute disables the ability to scroll the separator.

Nested SplitView​

By nesting another SplitView, more complex views can be created.

Editing styles​

The demonstration focuses on custom split-view visuals, especially when you need to customize the layout to the design system.

When to use​

Use wje-split-view to compose a stable page layout with a clear content hierarchy.

When not to use​

Do not use it to solve business logic or for stateful orchestration of components.

Accessibility​

Preserve the semantics of the document (header, main, aside, footer) and the logical order of focusable elements.

  • Define desktop/mobile breakpoints first and then fine-tune the details.
  • Prefer consistent spacing tokens over ad-hoc margin/padding values.
  • For layouts with overflow, always test keyboard navigation and readers.

Attributes and properties​

initial​

PopisRiadi správanie voľby initial v komponente.
Atribútinitial
Typany
Predvolené50

Events​

Pre tento komponent nie sú dostupné žiadne udalosti.

Methods​

detectSize​

PopisSpustí metódu detectSize na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra() => void

pixelsToPercentage​

PopisSpustí metódu pixelsToPercentage na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra(value: number) => number

CSS shadow parts​

NázovPopis
wje-dividerŠtýluje shadow časť wje-divider.

CSS custom variables​

NázovPopis
--wje-split-view-divider-areaVlastná CSS premenná na štýlovanie komponentu (divider area).
--wje-split-view-divider-widthVlastná CSS premenná, ktorá riadi divider width.
--wje-split-view-minVlastná CSS premenná na štýlovanie komponentu (min).
--wje-split-view-maxVlastná CSS premenná na štýlovanie komponentu (max).
--wje-split-view-calc-aVlastná CSS premenná na štýlovanie komponentu (calc a).
--wje-split-view-calc-bVlastná CSS premenná na štýlovanie komponentu (calc b).
--wje-split-view-clamp-aVlastná CSS premenná na štýlovanie komponentu (clamp a).
--wje-split-view-clamp-bVlastná CSS premenná na štýlovanie komponentu (clamp b).
--wje-split-view-divider-backgroundVlastná CSS premenná na štýlovanie komponentu (divider background).
--wje-split-view-divider-sizeVlastná CSS premenná na štýlovanie komponentu (divider size).

Slots​

NázovPopis
startSlot pre obsah zobrazený pred hlavným obsahom.
endSlot pre obsah zobrazený za hlavným obsahom.
dividerSlot pre obsah oddeľovača.