dioxus-std 0.2.1

Platform agnostic library for supercharging your productivity with Dioxus
docs.rs failed to build dioxus-std-0.2.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: dioxus-std-0.5.0

dioxus-std is a Dioxus standard library that provides abstractions for your Dioxus app. Abstractions included are notifications, clipboard, and more to come.

Current Features

  • Geolocation - (wasm, Windows)
  • Clipboard - (Desktop)
  • Notifications - (Desktop)
  • Utility Hooks
    • use_channel - (any)
    • use_rw - (any)
    • use_prefererred_color_scheme - (wasm)

Planned Features

  • Camera
  • WiFi
  • Bluetooth
fn app(cx: Scope) -> Element {
    let geolocator = hooks::init_geolocator(cx, PowerMode::High).unwrap();
    let coords = use_geolocation(cx);

    match coords {
      Ok(coords) => {
        render! { p { format!("Latitude: {} | Longitude: {}", coords.latitude, coords.longitude) } }
      }
      Err(Error::NotInitialized) => {
        render! { p { "Initializing..." }}
      }
      Err(e) => {
        render! { p { "An error occured {e}" }}
      }
    }
}

Platform Support

Currently dioxus-std primarily supports desktop targets. It is planned to support all of Dioxus' targets in the future.

  • Desktop (Windows, MacOS, Linux)
  • Mobile (Android, iOS)
  • Web (WASM)

On linux you need the x11 library to use the clipboard abstraction:

sudo apt-get install xorg-dev

Installation

You can add dioxus-std to your application by adding it to your dependencies.

[dependencies]
dioxus-std =  { version = "0.2.0", features = [] }

License

This project is licensed under the MIT license.

Every contribution intentionally submitted for inclusion in dioxus-std by you, shall be licensed as MIT, without any additional terms or conditions.