egui_knob
A simple, customizable knob widget for egui.

Features
- Adjustable size, font size, and stroke width
- Customizable colors for the knob, indicator, and text
- Label positions (Top, Bottom, Left, Right)
- Custom label formatting
- Two visual styles: Wiper and Dot
- Configurable sweep range
- Background arc with filled segments
- Adjustable drag sensitivity
Installation
To use the Knob widget in your project, add the following to your Cargo.toml:
[]
= "0.33"
= "0.33"
= "0.3.5"
Usage
Basic Example
use ;
use egui;
Advanced Examples
Custom Sweep Range
// 270° sweep starting from the left (9 o'clock position)
new
.with_sweep_range
.with_label;
Multi-Turn Knob
// 2.5 full rotations
new
.with_sweep_range;
Stepped Values
// Snap to 0.1 increments
new
.with_step
.with_label_format;
Custom Formatting
// Display as percentage
new
.with_label_format;
Running demo app
Demo app is available at examples/example_knob.rs.
Contributing
Contributions are welcome. Feel free to open an issue or submit a PR.