resuma 0.2.3

Resuma — SSR + Resumability + Islands + Server Actions + JS Bridge for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! View Transitions API helpers.

use super::view::{Attr, AttrValue, Child, Element, View};

/// Wrap content in a View Transition boundary (`document.startViewTransition`).
pub fn with_view_transition(name: impl Into<String>, children: Vec<Child>) -> View {
    View::Element(Element {
        tag: "div".into(),
        attrs: vec![Attr {
            name: "data-r-vt".into(),
            value: AttrValue::Static(name.into()),
        }],
        children,
        dom_id: None,
    })
}