euv_ui/component/card/struct.rs
1use super::*;
2
3/// Elevated surface card container with optional title, subtitle, and child nodes.
4#[derive(Clone, Data, Debug, New, Props)]
5pub struct EuvCard {
6 /// Optional card heading.
7 pub(crate) title: String,
8 /// Optional muted subtitle.
9 #[new(skip)]
10 #[prop(custom)]
11 pub(crate) subtitle: String,
12 /// Active theme tokens.
13 #[get(type(copy))]
14 pub(crate) tokens: ThemeTokens,
15 /// Pre-mounted child nodes appended inside the card body.
16 #[new(skip)]
17 pub(crate) children: Vec<NodeId>,
18 /// Optional style overrides merged onto the card surface (`style: { text_select: ..., padding: ... }`).
19 #[new(skip)]
20 #[get(type(copy))]
21 pub(crate) style: Option<Style>,
22}
23
24/// Page header banner component displaying title and subtitle consistently across all pages.
25#[derive(Clone, Data, Debug, New, Props)]
26pub struct EuvHeader {
27 /// Page title text.
28 pub(crate) title: String,
29 /// Page description subtitle.
30 pub(crate) subtitle: String,
31 /// Active theme tokens.
32 #[get(type(copy))]
33 pub(crate) tokens: ThemeTokens,
34}
35
36/// Compact KPI / telemetry metric card.
37#[derive(Clone, Data, Debug, New, Props)]
38pub struct EuvStatCard {
39 /// Metric label.
40 pub(crate) label: String,
41 /// Primary formatted metric value.
42 pub(crate) value: String,
43 /// Supporting caption or delta text.
44 pub(crate) caption: String,
45 /// Active theme tokens.
46 #[get(type(copy))]
47 pub(crate) tokens: ThemeTokens,
48}