ImGui Knobs: rotary knobs for numeric values, in several styles (tick, dot, wiper, stepped, space...).
knob(label, value, v_min, v_max) returns (changed, new_value); knob_int() is its integer version.
Upstream repository · The book’s page
Modules¶
In imgui_bundle (from imgui_bundle import imgui_knobs):
imgui_knobs: 4 functions, 2 classes, 2 enums · the C++ view
Demos using it¶
The demos of the catalog that use it (the pictures link to their code and to the playground).

A parametric curve¶
Turn the knobs, or click Random: the curve follows at once.
More
At every frame, the GUI function draws the plot with ImPlot and the knobs with imgui-knobs, and reads their values right there. No callbacks, no widget objects: that is the immediate mode.
Uses: ImPlot, knobs

Simple harmonic motion¶
A mass on a spring, a pendulum, a vibrating string: they all follow the same equation.
More
It is the equation of simple harmonic motion (for the pendulum, at small angles). Adjust the mass and the spring stiffness, and watch how the motion changes.
Uses: ImPlot, knobs

Double pendulum¶
A double pendulum is a chaotic system: tiny changes in its initial conditions lead to wildly different trajectories.
More
Drag the angles to set initial positions, then release and watch chaos unfold.
Uses: ImPlot, knobs, toggles

Fourier epicycles¶
Any closed curve can be approximated by a sum of rotating circles (a Fourier series).
More
Adjust the number of circles to see how the approximation improves.
Uses: ImPlot, knobs, toggles

Knobs, toggles, spinners and more¶
Knobs, toggle switches, spinners, a command palette, a dock-like cool bar: widgets beyond Dear ImGui’s own.
More
They come from the libraries in the bundle: imgui-knobs, imgui_toggle, imspinner, imgui
Uses: knobs, toggles, spinners, cool bar, command palette, file dialogs

WebAudio synthesizer¶
A small synthesizer written in Python: play the piano with the mouse or the computer keyboard, or let it play a tune.
More
Pick a waveform, add some echo, and watch the scope. Pyodide only: it plays through the browser’s WebAudio API, via Pyodide’s js interop.
Browser only
Uses: knobs, browser APIs

