Skip to main content

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    pub lines: usize,
14    /// The inline width applied to every line, e.g. `"60%"` (falls back
15    /// to `"100%"` when empty or not a percentage).
16    pub width: &'static str,
17    /// The inline height applied to every line, e.g. `"24px"` (falls back
18    /// to the stylesheet default when empty).
19    pub height: &'static str,
20    /// Whether the lines are drawn with rounded corners instead of the
21    /// design system's square `border-radius: 0px` default.
22    #[get(type(copy))]
23    pub rounded: Signal<bool>,
24}