functora-egui 0.2.0

shadcn/ui-inspired widget library for egui - buttons, inputs, selects, dialogs, and 70+ more components with light/dark theming
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! `FieldGroup` — vertical stack with gap-5 (20px) spacing.

/// A vertical stack of form fields with consistent spacing.
pub struct FieldGroup;

impl FieldGroup {
    /// Renders child content in a vertical layout with 20px gaps.
    pub fn show(ui: &mut egui::Ui, content: impl FnOnce(&mut egui::Ui)) -> egui::InnerResponse<()> {
        ui.vertical(|inner_ui| {
            inner_ui.spacing_mut().item_spacing.y = 20.0; // gap-5
            content(inner_ui);
        })
    }
}