pub enum SpaTransition {
Fade,
Slide(SlideOptions),
}Expand description
How spa-mode animates the swap between pages, set via
crate::Server::with_spa_transition. Both variants use the View
Transitions API when the browser supports it, and are a plain synchronous
swap (no animation) otherwise.
Variants§
Fade
The browser’s default cross-fade, with no CSS injected. This is the
default for with_spa_mode()/with_spa_root() when
with_spa_transition() isn’t called.
Slide(SlideOptions)
The outgoing page slides out one side while the incoming page slides
in from the other — the same direction for every navigation,
including the browser Back button — per SlideOptions. mini-static
injects the CSS this needs (keyframes, and the mix-blend-mode: normal override the browser’s default cross-fade blend mode
requires to look like a clean slide instead of a wash between the two
pages) — no site CSS required.
Trait Implementations§
Source§impl Clone for SpaTransition
impl Clone for SpaTransition
Source§fn clone(&self) -> SpaTransition
fn clone(&self) -> SpaTransition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more