Signal Forms

Knob

Radial dial input. A signal-forms native control: the value is a number, snapped to step and clamped to [min, max]. Drag around the dial or use arrow keys (Shift = ×10); Home / End jump to the ends.

Installation

import { WrKnob } from 'ngwr/knob';

@Component({ imports: [WrKnob] })
export class MyComponent {}

Basic

<wr-knob [(value)]="value" [min]="0" [max]="100" suffix="%" />
45
70%

API

NameDescriptionTypeDefault
ariaLabelAccessible name — the role needs one. Falls back to knob.label.string | nullnull
minMinimum allowed value.number | undefined0
maxMaximum allowed value.number | undefined100
stepStep granularity.number1
sizeDial diameter in CSS pixels.number120
strokeWidthStroke width of the dial arc, in CSS pixels.number8
trackColorTrack (unfilled) color.stringrgba(--wr-color-light, 0.6)
valueColorFilled-arc color.stringvar(--wr-color-primary)
showValueShow the value text in the center.booleantrue
suffixOptional suffix appended to the center text (e.g. '%').string''
readonlyRead-only — disables interaction but keeps the visual.booleanfalse
disabledDisable interaction.booleanfalse
valueBound by [formField], or two-way via [(value)].number0
(touch)Emitted on blur so a bound field can mark itself touched.void