pub struct NavigationMenuContentSwitchOutput {
pub from_idx: usize,
pub to_idx: usize,
pub progress: f32,
pub animating: bool,
pub forward: bool,
pub from_motion: NavigationMenuContentMotion,
pub to_motion: NavigationMenuContentMotion,
}Expand description
A convenience wrapper around NavigationMenuContentTransitionOutput for recipes that need to
render “from” + “to” layers during a value switch (shadcn-style data-motion transitions).
This models Radix’s behavior of only animating the selected and the previously selected content, avoiding unnecessary mounts and interrupted animations outside of that range.
Fields§
§from_idx: usize§to_idx: usize§progress: f32§animating: bool§forward: bool§from_motion: NavigationMenuContentMotion§to_motion: NavigationMenuContentMotionTrait Implementations§
Source§fn clone(&self) -> NavigationMenuContentSwitchOutput
fn clone(&self) -> NavigationMenuContentSwitchOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn eq(&self, other: &NavigationMenuContentSwitchOutput) -> bool
fn eq(&self, other: &NavigationMenuContentSwitchOutput) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more