Expand description
Card — a rounded surface that groups related content.
Doubles as gpui-component’s section/GroupBox container: pass an optional
title / description to render a
header, then add the body in the show closure, just like
List.
Mirroring upstream GroupBox, the surface uses one of three mutually
exclusive styles — it never combines a fill and a border (doing so makes
the border invisible in themes where the muted surface and border share a
color, e.g. the default dark theme):
CardVariant::Fill(default) — filledmuted_background, no border.CardVariant::Outline— a border, no fill.CardVariant::Normal— neither; just padded content.
ⓘ
sc::Card::new()
.title("Account")
.description("Manage your profile settings.")
.show(ui, |ui| {
ui.add(sc::Input::new(&mut name));
});Structs§
- Card
- A surface container with an optional header (title + description).
Enums§
- Card
Variant - How a
Card’s surface is drawn. Matches upstreamGroupBoxVariant: a card is either filled or outlined, never both.