pub struct RateProps {Show 14 fields
pub model_value: f64,
pub max: u32,
pub disabled: bool,
pub allow_half: bool,
pub clearable: bool,
pub show_text: bool,
pub show_score: bool,
pub texts: Vec<String>,
pub active_color: String,
pub inactive_color: String,
pub size: RateSize,
pub on_change: Option<EventHandler<f64>>,
pub class: Option<String>,
pub style: Option<String>,
}Expand description
Rate props
Fields§
§model_value: f64Current rating value
max: u32Maximum rating value (number of stars)
disabled: boolWhether the rate is disabled
allow_half: boolWhether to allow half stars
clearable: boolWhether to allow clearing (click again to clear)
show_text: boolWhether to show text
show_score: boolWhether to show score
texts: Vec<String>Text array for each rating level
active_color: StringColor for active stars
inactive_color: StringColor for inactive stars
size: RateSizeRate size
on_change: Option<EventHandler<f64>>Change event handler
class: Option<String>Additional CSS classes
style: Option<String>Inline styles
Implementations§
Source§impl RateProps
impl RateProps
Sourcepub fn builder() -> RatePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> RatePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building RateProps.
On the builder, call .model_value(...)(optional), .max(...)(optional), .disabled(...)(optional), .allow_half(...)(optional), .clearable(...)(optional), .show_text(...)(optional), .show_score(...)(optional), .texts(...)(optional), .active_color(...)(optional), .inactive_color(...)(optional), .size(...)(optional), .on_change(...)(optional), .class(...)(optional), .style(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of RateProps.