egui_knob

Crates.ioegui_knob
lib.rsegui_knob
version0.3.3
created_at2025-02-03 09:58:43.774876+00
updated_at2025-07-15 23:23:17.846548+00
descriptionA simple knob widget for egui
homepagehttps://github.com/obsqrbtz/egui_knob
repositoryhttps://github.com/obsqrbtz/egui_knob
max_upload_size
id1540272
size161,288
Daniel Dada (obsqrbtz)

documentation

README

egui_knob

Crates.io Version

Simple knob widget for egui.

Knob Widget Screenshot

Features

  • Adjustable size, font size, and stroke width.
  • Customizable colors for the knob, indicator and text.
  • Label positions (Top, Bottom, Left, Right).
  • Label formatting.
  • Two styles: Wiper and Dot.

Installation

To use the Knob widget in your project, add the following to your Cargo.toml:

[dependencies]
egui = "0.32"
egui_knob = "0.3.3"

Usage example

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);
});
Commit count: 31

cargo fmt