euv_ui/component/skeleton/view/struct.rs
1use super::*;
2
3/// Props for the [`euv_skeleton`] component.
4///
5/// Defines the strongly-typed interface for a loading placeholder. The
6/// block is measured in whole lines rather than free-form children, so a
7/// caller can mirror the shape of the content it replaces without
8/// restyling it when the design tokens change.
9#[derive(Clone, CustomDebug, Data, Default, New)]
10pub struct EuvSkeletonProps {
11 /// The number of placeholder lines to draw, clamped to
12 /// [`skeleton_line_count`]'s `1..=8` range.
13 #[get(type(copy))]
14 pub lines: usize,
15 /// The inline width applied to every line, e.g. `"60%"` (falls back
16 /// to `"100%"` when empty or not a percentage).
17 pub width: &'static str,
18 /// The inline height applied to every line, e.g. `"24px"` (falls back
19 /// to the stylesheet default when empty).
20 pub height: &'static str,
21 /// Whether the lines are drawn with rounded corners instead of the
22 /// design system's square `border-radius: 0px` default.
23 #[get(type(copy))]
24 pub rounded: Signal<bool>,
25}