pub struct TypeAnimationProps {Show 14 fields
pub sequence: Vec<SequenceElement>,
pub repeat: Repeat,
pub wrapper: Wrapper,
pub cursor: bool,
pub speed: Speed,
pub deletion_speed: Option<Speed>,
pub omit_deletion_animation: bool,
pub pre_render_first_string: bool,
pub splitter: Option<StringSplitter>,
pub class: Option<String>,
pub style: Option<String>,
pub aria_label: Option<String>,
pub aria_hidden: Option<String>,
pub role: Option<String>,
}Expand description
Props for TypeAnimation.
The component intentionally compares props as always equal, matching the React implementation’s permanent memoization/immutability behavior. If you need changed props to take effect, mount a new component instance with a different key.
Fields§
§sequence: Vec<SequenceElement>Animation sequence: text, delays in milliseconds, and callbacks.
repeat: RepeatFinite or infinite repeat behavior. Default: no repeats.
wrapper: WrapperWrapper element. Default: Wrapper::Span.
cursor: boolShow the default blinking cursor. Default: true.
speed: SpeedTyping speed. Default: Speed::Preset(40).
deletion_speed: Option<Speed>Deletion speed. Default: same as speed.
omit_deletion_animation: boolIf true, deletions are instant and only writing is animated.
pre_render_first_string: boolIf true, initially render the first string in sequence without typing
it. Default matches the React source: false.
splitter: Option<StringSplitter>Optional custom splitter. Default: text.chars().
class: Option<String>Class applied to the wrapper.
style: Option<String>Inline style string applied to the wrapper.
aria_label: Option<String>aria-label applied to the wrapper. When set, the animated visual text
is rendered in an inner aria-hidden="true" span.
aria-hidden applied to the wrapper.
role: Option<String>ARIA role applied to the wrapper.
Implementations§
Source§impl TypeAnimationProps
impl TypeAnimationProps
Sourcepub fn builder() -> TypeAnimationPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TypeAnimationPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TypeAnimationProps.
On the builder, call .sequence(...), .repeat(...)(optional), .wrapper(...)(optional), .cursor(...)(optional), .speed(...)(optional), .deletion_speed(...)(optional), .omit_deletion_animation(...)(optional), .pre_render_first_string(...)(optional), .splitter(...)(optional), .class(...)(optional), .style(...)(optional), .aria_label(...)(optional), .aria_hidden(...)(optional), .role(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TypeAnimationProps.
Trait Implementations§
Source§impl Clone for TypeAnimationProps
impl Clone for TypeAnimationProps
Source§fn clone(&self) -> TypeAnimationProps
fn clone(&self) -> TypeAnimationProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more