resuma 0.4.7

Resuma — resumable SSR Rust web framework: zero hydration, islands, server actions, Flow (Axum).
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,
    })
}