UI Components

Sash

The handle between two panes that the person drags, or moves with the arrow keys, to resize them. It reports how far it moved; the owner resizes the panes, keeps them within their limits and positions the sash. It is a focusable separator whose highlight shows after the pointer rests on it for 300 milliseconds and while it is dragged.

Examples

Loading…

States

Loading…

API

Selector nol-sash

Import from @noldova/ui.components.angular

Inputs

NameTypeDefaultDescription
orientationSashOrientation Required

Which way the sash runs: a vertical sash stands between panes side by side and moves left and right, with the left and right arrow keys; a horizontal sash lies between stacked panes and moves up and down, with the up and down arrow keys.

labelstring Required

The accessible name, such as "Resize the sidebar".

valuenumber | undefinedundefined

The size of the pane the sash resizes, in pixels, which assistive technology announces; none when not bound. The sash does not limit itself by it.

minimumnumber | undefinedundefined

The smallest size of SashComponent.value, in pixels, which assistive technology announces; none when not bound.

maximumnumber | undefinedundefined

The largest size of SashComponent.value, in pixels, which assistive technology announces; none when not bound.

stepnumberSashResources.sashKeyboardStep

How far one arrow key moves the sash, in pixels; 8 when not bound.

Outputs

NameTypeDescription
resizenumber

Emits each move in pixels: positive toward the right for a vertical sash and downward for a horizontal one, negative the other way. A drag emits the distance the pointer moved since the last emission, never 0; an arrow key emits plus or minus SashComponent.step.

Accessibility

KeyAction
TabMoves the focus to the sash, one Tab stop, which shows its in-use bar while it has the keyboard focus.
Arrow LeftOn a vertical sash, reports a move of one step to the left, 8px unless its owner sets another step; the owner resizes the panes.
Arrow RightOn a vertical sash, reports a move of one step to the right.
Arrow UpOn a horizontal sash, reports a move of one step upward.
Arrow DownOn a horizontal sash, reports a move of one step downward.

It is a focusable separator named by its label, which names the pane it resizes, with its orientation: vertical between panes side by side, horizontal between stacked panes.

The value, minimum and maximum its owner binds are the pane's size and limits in pixels, which assistive technology announces; the sash keeps to no limit itself, so its owner clamps the size.

Its grip and its in-use bar are hidden from assistive technology.

Specification

Loading…