Card

A container component with the card background and border styling.

Figma Mockup

Card Card variant Title card

Preview

Rendered in WASM — scroll may behave differently from the rest of the page

Usage

rust
use ui_theme::components::card;

card(ui, &theme, |ui| {
  ui.label("Card content");
});

Props

Prop Type Default Description
ui &mut Ui required The egui UI context
theme &Theme required Theme instance
add_contents impl FnOnce(&mut Ui) required Card body content