7 releases

0.3.0 Dec 15, 2024
0.3.0-alpha.4 Oct 27, 2024
0.3.0-alpha.3 Aug 28, 2024
0.2.1 Jun 6, 2024
0.2.0-alpha.1 Mar 26, 2024

#168 in WebAssembly

Download history 21/week @ 2024-09-17 39/week @ 2024-09-24 13/week @ 2024-10-01 6/week @ 2024-10-08 3/week @ 2024-10-15 85/week @ 2024-10-22 49/week @ 2024-10-29 18/week @ 2024-11-05 8/week @ 2024-11-19 6/week @ 2024-11-26 2/week @ 2024-12-03 152/week @ 2024-12-10 29/week @ 2024-12-17 3/week @ 2024-12-24

186 downloads per month
Used in 3 crates

MIT license

15KB
57 lines

dioxus-resize-observer

License Crates.io Docs CI Discord Server

Resize observer hooks for Dioxus 🧬.

Example

use dioxus::prelude::*;
use dioxus_resize_observer::use_size;
use dioxus_use_mounted::use_mounted;

fn app() -> Element {
    let mounted = use_mounted();
    let (width, height) = use_size(mounted);

    rsx!(div {
      onmounted: move |event| mounted.onmounted(event),
      "Size: {width} x {height}"
    })
}

Support

  • Web renderer (WASM)
    • 0.1.0 - Dioxus v0.4
    • 0.2.0 - Dioxus v0.5
    • 0.3.0 - Dioxus v0.6

License

MIT

Dependencies

~13–21MB
~306K SLoC