pub struct SliderProps {
pub value: Option<f64>,
pub default_value: Option<f64>,
pub min: Option<f64>,
pub max: Option<f64>,
pub step: Option<f64>,
pub disabled: bool,
pub name: Option<String>,
pub on_value_change: Option<EventHandler<f64>>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for Slider.
Fields§
§value: Option<f64>Controlled value. Leave unset to let the slider manage itself.
default_value: Option<f64>Initial value when uncontrolled. Defaults to the midpoint of the range.
min: Option<f64>Lower bound. Defaults to 0.
max: Option<f64>Upper bound. Defaults to 100.
step: Option<f64>Step size. Defaults to 1.
disabled: boolDisables the slider.
name: Option<String>Form field name.
on_value_change: Option<EventHandler<f64>>Called with the new value while the user drags or presses keys.
class: Option<String>Extra classes appended after the Lumen class.
attributes: Vec<Attribute>Any other <input> or global attribute, such as id, aria_label, or
aria_valuetext.
Implementations§
Source§impl SliderProps
impl SliderProps
Sourcepub fn builder() -> SliderPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> SliderPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building SliderProps.
On the builder, call .value(...)(optional), .default_value(...)(optional), .min(...)(optional), .max(...)(optional), .step(...)(optional), .disabled(...)(optional), .name(...)(optional), .on_value_change(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of SliderProps.
Trait Implementations§
Source§impl Clone for SliderProps
impl Clone for SliderProps
Source§impl PartialEq for SliderProps
impl PartialEq for SliderProps
Source§impl Properties for SliderPropswhere
Self: Clone,
impl Properties for SliderPropswhere
Self: Clone,
Source§type Builder = SliderPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
type Builder = SliderPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for SliderProps
Auto Trait Implementations§
impl !RefUnwindSafe for SliderProps
impl !Send for SliderProps
impl !Sync for SliderProps
impl !UnwindSafe for SliderProps
impl Forget for SliderProps
impl Freeze for SliderProps
impl Move for SliderProps
impl Unpin for SliderProps
impl UnsafeUnpin for SliderPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<f64, ()>>>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more