pub struct ComponentProps {Show 22 fields
pub label: Option<String>,
pub on: Option<bool>,
pub value: Option<f64>,
pub min: Option<f64>,
pub max: Option<f64>,
pub sf_symbol: Option<String>,
pub image: Option<String>,
pub circular: Option<bool>,
pub glass: Option<bool>,
pub prominent: Option<bool>,
pub tint: Option<String>,
pub width: Option<f64>,
pub height: Option<f64>,
pub x: Option<f64>,
pub y: Option<f64>,
pub corner_radius: Option<f64>,
pub axis: Option<String>,
pub align: Option<String>,
pub spacing: Option<f64>,
pub inset: Option<f64>,
pub items: Option<Vec<TabItem>>,
pub selected_id: Option<String>,
}Expand description
Per-kind properties. All optional; irrelevant fields are ignored.
Fields§
§label: Option<String>Text: button title, switch/slider accessibility label.
on: Option<bool>Switch state.
value: Option<f64>Slider/progress value (progress is 0..1).
min: Option<f64>§max: Option<f64>§sf_symbol: Option<String>SF Symbol for buttons.
image: Option<String>Bitmap as base64 (raw or data: URL) — image components, button icons.
circular: Option<bool>Clip the bitmap to a circle (avatar style).
glass: Option<bool>Wrap the control in a floating glass capsule.
prominent: Option<bool>Prominent (tinted) button style.
tint: Option<String>Hex tint color #RRGGBB[AA].
width: Option<f64>Explicit size in points (defaults to the control’s natural size).
height: Option<f64>§x: Option<f64>Top-left position in CSS points, for absolute placement. Also
accepted by update_component to move/resize (DOM scroll sync).
y: Option<f64>§corner_radius: Option<f64>Corner radius for glass panels.
axis: Option<String>horizontal (a bar) or vertical (a sidebar). Default horizontal.
align: Option<String>Cross-axis alignment of children: center (default) | leading |
trailing | fill.
spacing: Option<f64>Gap between children, in points.
inset: Option<f64>Gap from the anchored edge of the safe area, in points.
items: Option<Vec<TabItem>>The tabs, when kind == tabBar.
selected_id: Option<String>Initially-selected tab id (defaults to the first).
Trait Implementations§
Source§impl Clone for ComponentProps
impl Clone for ComponentProps
Source§fn clone(&self) -> ComponentProps
fn clone(&self) -> ComponentProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more