Knob

Knob is a form component to define number inputs with a dial.

48 Volume
75 Treble
24 Bass
PREVIEW

Knob is an input component and used with the standard ngModel directive.

50
basic-demo

Boundaries are configured with the min and max properties whose defaults are 0 and 100 respectively.

10
min-max-demo

Size of each movement is defined with the step property.

50
step-demo

Label is a string template that can be customized with the valueTemplate property having 60 as the placeholder .

60%
template-demo

The border size is specified with the strokeWidth property as a number in pixels.

40
stroke-demo

Diameter of the knob is defined in pixels using the size property.

60
size-demo

Colors are customized with the textColor, rangeColor and valueColor properties.

50
color-demo

Knob can be controlled with custom controls as well.

0
reactive-demo

When readonly present, value cannot be edited.

50
readonly-demo

When disabled is present, a visual hint is applied to indicate that the Knob cannot be interacted with.

75
disabled-demo
15
signal-forms-demo
15
template-driven-forms-demo
15
reactive-forms-demo

Screen Reader

Knob element component uses slider role in addition to the aria-valuemin, aria-valuemax and aria-valuenow attributes. Value to describe the component can be defined using ariaLabelledBy and ariaLabel props.

Keyboard Support

KeyFunction
tabMoves focus to the slider.
left arrowdown arrowDecrements the value.
right arrowup arrowIncrements the value.
homeSet the minimum value.
endSet the maximum value.
page upIncrements the value by 10 steps.
page downDecrements the value by 10 steps.