Module

Halogen.Widgets.Knob

Package
purescript-halogen-widgets
Repository
afcondon/purescript-halogen-widgets

A controlled rotary knob — Number-valued, vertical-drag gesture, 300° sweep (7 o'clock → 5 o'clock). The fully-controlled instance of the contract for a continuous control whose value lives in app state.

The drag is debounced inside the widget (a drag fires a flood of mousemove events) — same machinery as Slider. Mousedown captures the start; document- level mousemove/mouseup subscriptions track the rest, so the gesture survives the pointer leaving the SVG. 140 px = full range (the conventional knob feel, matching producing-with-your-feet's Donut and Triggerfish's port).

Geometry ported from Triggerfish's Triggerfish.Ui.Knob, which itself was a port from producing-with-your-feet's Component.Pedal.Donut. The arc, pointer indicator, optional detent ticks, and face are SVG via Halogen's elementNS; no external SVG library involved.

#Input Source

type Input = { color :: String, debounce :: Milliseconds, disabled :: Boolean, label :: Maybe String, max :: Number, min :: Number, size :: Number, ticks :: Int, value :: Number }

#Output Source

data Output

Constructors

#Query Source

data Query a

Constructors

#component Source

#defaultInput Source