pub struct SplitTextProps {
pub text: String,
pub element: SplitTextElement,
pub by: SplitTextBy,
pub duration: MotionDuration,
pub offset: Option<u32>,
pub stagger: Option<u32>,
pub max_delay: Option<u32>,
pub trigger: SplitTextTrigger,
pub style: Option<String>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for SplitText.
Fields§
§text: StringThe text to split.
element: SplitTextElementThe root element, lumen-react’s as.
by: SplitTextBySplit into words or characters.
duration: MotionDurationTransition length of each item.
offset: Option<u32>Starting stagger index, so several runs inside one heading continue one sequence.
stagger: Option<u32>Milliseconds between items. Defaults to 40; zero also uses the default.
max_delay: Option<u32>Longest wait, in milliseconds, before the last item starts; longer runs shorten the step.
trigger: SplitTextTriggerWhen the items animate.
style: Option<String>Inline style; the stagger is appended to it.
class: Option<String>Extra classes appended after the Lumen classes.
attributes: Vec<Attribute>Any other global attribute.
Implementations§
Source§impl SplitTextProps
impl SplitTextProps
Sourcepub fn builder() -> SplitTextPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> SplitTextPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building SplitTextProps.
On the builder, call .text(...), .element(...)(optional), .by(...)(optional), .duration(...)(optional), .offset(...)(optional), .stagger(...)(optional), .max_delay(...)(optional), .trigger(...)(optional), .style(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of SplitTextProps.
Trait Implementations§
Source§impl Clone for SplitTextProps
impl Clone for SplitTextProps
Source§impl PartialEq for SplitTextProps
impl PartialEq for SplitTextProps
Source§impl Properties for SplitTextPropswhere
Self: Clone,
impl Properties for SplitTextPropswhere
Self: Clone,
Source§type Builder = SplitTextPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
type Builder = SplitTextPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
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 SplitTextProps
Auto Trait Implementations§
impl !RefUnwindSafe for SplitTextProps
impl !Send for SplitTextProps
impl !Sync for SplitTextProps
impl !UnwindSafe for SplitTextProps
impl Forget for SplitTextProps
impl Freeze for SplitTextProps
impl Move for SplitTextProps
impl Unpin for SplitTextProps
impl UnsafeUnpin for SplitTextPropswhere
*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