Expand description
Tab bar component with underline indicator.
Provides a horizontal tab bar that renders clickable text labels with an accent-colored underline on the active tab. Used across all tabbed dialogs.
§Example
use egui_charts::ui_kit::tab_bar::{TabBar, TabLabel};
#[derive(Clone, Copy, PartialEq)]
enum MyTab {
Chart,
Orders,
}
impl TabLabel for MyTab {
fn tab_label(&self) -> &str {
match self {
MyTab::Chart => "Chart",
MyTab::Orders => "Orders",
}
}
}
TabBar::new(&[MyTab::Chart, MyTab::Orders], &mut active_tab).show(ui);Structs§
- TabBar
- Horizontal tab bar with underline indicator on the active tab.
Traits§
- TabLabel
- Trait for tab enum types to provide their display label.