Expand description
ScrollArea — a theme-styled wrapper around egui::ScrollArea.
Plain egui::ScrollArea works fine; this wrapper exists so scrollable
regions in a component layout get the same slim, modern scroll bars as the
rest of the kit (the shadcn ScrollArea look) without each call site having
to tweak Style::spacing.scroll. It mirrors upstream gpui-component’s
scroll module, whose Scrollbar likewise renders a thin overlay handle.
It forwards the common egui::ScrollArea knobs and returns egui’s own
ScrollAreaOutput, so it is a drop-in replacement:
ⓘ
sc::ScrollArea::vertical()
.max_height(200.0)
.show(ui, |ui| {
for i in 0..100 {
ui.add(sc::Label::new(format!("Row {i}")));
}
});Structs§
- Scroll
Area - A scrollable region with themed scroll bars.