pub struct CardProps {
pub title: Option<Element>,
pub extra: Option<Element>,
pub bordered: bool,
pub size: Option<ComponentSize>,
pub loading: bool,
pub hoverable: bool,
pub class: Option<String>,
pub style: Option<String>,
pub children: Element,
}Expand description
Props for the Card component (MVP subset).
Fields§
§title: Option<Element>Optional card title rendered in the header.
extra: Option<Element>Optional extra content rendered in the header’s right area.
bordered: boolWhether to show a border around the card.
size: Option<ComponentSize>Visual density of the card paddings and typography.
loading: boolLoading state. When true, the body renders a simple skeleton instead of the provided children.
hoverable: boolWhether the card should have a hover effect.
class: Option<String>Extra class name for the root element.
style: Option<String>Inline style for the root element.
children: ElementCard body content.
Implementations§
Source§impl CardProps
impl CardProps
Sourcepub fn builder() -> CardPropsBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> CardPropsBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building CardProps.
On the builder, call .title(...)(optional), .extra(...)(optional), .bordered(...)(optional), .size(...)(optional), .loading(...)(optional), .hoverable(...)(optional), .class(...)(optional), .style(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of CardProps.