Expand description
Heading — section title typography.
A heading renders a strong title at one of four levels (H1–H4) with an
optional muted description line underneath, matching the shadcn/typography
section-title pattern. Upstream gpui-component has no dedicated heading type
(its Text primitive is a full rich-text view); this is the lightweight
egui-idiomatic equivalent used to label pages and sections.
ⓘ
ui.add(sc::Heading::new("Settings")); // H2 (default)
ui.add(sc::Heading::new("Welcome back").level(sc::HeadingLevel::H1));
ui.add(
sc::Heading::new("Notifications")
.level(sc::HeadingLevel::H3)
.description("Choose what you want to be notified about."),
);Structs§
- Heading
- A section title with an optional description sub-line.
Enums§
- Heading
Level - Heading level — controls the title’s font size (and, transitively, its visual weight in the hierarchy). Smaller number = larger / more prominent.