| Crates.io | egui_knob |
| lib.rs | egui_knob |
| version | 0.3.3 |
| created_at | 2025-02-03 09:58:43.774876+00 |
| updated_at | 2025-07-15 23:23:17.846548+00 |
| description | A simple knob widget for egui |
| homepage | https://github.com/obsqrbtz/egui_knob |
| repository | https://github.com/obsqrbtz/egui_knob |
| max_upload_size | |
| id | 1540272 |
| size | 161,288 |
Simple knob widget for egui.

To use the Knob widget in your project, add the following to your Cargo.toml:
[dependencies]
egui = "0.32"
egui_knob = "0.3.3"
use egui::{Color32, Context};
use egui_knob::Knob;
// ..
let mut value: f32 = 0.5;
let knob = Knob::new(&mut value, 0.0, 1.0, KnobStyle::Wiper)
.with_size(50.0)
.with_font_size(14.0)
.with_stroke_width(3.0)
.with_colors(Color32::GRAY, Color32::WHITE, Color32::WHITE)
.with_label("Volume", LabelPosition::Top);
egui::CentralPanel::default().show(ctx, |ui| {
ui.add(knob);
});