pub struct ScrollProgressProps {
pub position: ScrollProgressPosition,
pub target_id: Option<String>,
pub tone: ScrollProgressTone,
pub value: Option<f64>,
pub aria_label: String,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for ScrollProgress.
Fields§
§position: ScrollProgressPositionEdge of the viewport.
target_id: Option<String>Measures progress through this element instead of the whole document.
tone: ScrollProgressToneBar color.
value: Option<f64>Progress as a ratio from 0 to 1. Set it to drive the bar yourself, which Dioxus Native needs; leave it unset to track the page scroll on web and desktop.
aria_label: StringAccessible name. Defaults to “Reading progress”.
class: Option<String>Extra classes appended after the Lumen classes.
attributes: Vec<Attribute>Any other <div> or global attribute.
Implementations§
Source§impl ScrollProgressProps
impl ScrollProgressProps
Sourcepub fn builder() -> ScrollProgressPropsBuilder<((), (), (), (), (), (), ())>
pub fn builder() -> ScrollProgressPropsBuilder<((), (), (), (), (), (), ())>
Create a builder for building ScrollProgressProps.
On the builder, call .position(...)(optional), .target_id(...)(optional), .tone(...)(optional), .value(...)(optional), .aria_label(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ScrollProgressProps.
Trait Implementations§
Source§impl Clone for ScrollProgressProps
impl Clone for ScrollProgressProps
Source§impl PartialEq for ScrollProgressProps
impl PartialEq for ScrollProgressProps
Source§impl Properties for ScrollProgressPropswhere
Self: Clone,
impl Properties for ScrollProgressPropswhere
Self: Clone,
Source§type Builder = ScrollProgressPropsBuilder<((), (), (), (), (), (), ())>
type Builder = ScrollProgressPropsBuilder<((), (), (), (), (), (), ())>
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 ScrollProgressProps
Auto Trait Implementations§
impl !RefUnwindSafe for ScrollProgressProps
impl !Send for ScrollProgressProps
impl !Sync for ScrollProgressProps
impl !UnwindSafe for ScrollProgressProps
impl Forget for ScrollProgressProps
impl Freeze for ScrollProgressProps
impl Move for ScrollProgressProps
impl Unpin for ScrollProgressProps
impl UnsafeUnpin for ScrollProgressPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: 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