#dioxus #hook #standard #dom #gui #color-scheme

dioxus-sdk

Platform agnostic library for supercharging your productivity with Dioxus

2 unstable releases

0.5.0 Apr 5, 2024
0.0.0 Apr 4, 2024

#209 in Multimedia

Download history 214/week @ 2024-03-31 696/week @ 2024-04-07 555/week @ 2024-04-14 486/week @ 2024-04-21 556/week @ 2024-04-28 423/week @ 2024-05-05 304/week @ 2024-05-12 281/week @ 2024-05-19 208/week @ 2024-05-26 234/week @ 2024-06-02 255/week @ 2024-06-09 245/week @ 2024-06-16 296/week @ 2024-06-23 190/week @ 2024-06-30 290/week @ 2024-07-07 301/week @ 2024-07-14

1,109 downloads per month
Used in 7 crates (2 directly)

MIT license

81KB
1.5K SLoC

🧰 Dioxus Development Kit 🚀

A platform agnostic library for supercharging your productivity with Dioxus.


This library is still under development. Expect breaking changes!


dioxus-sdk is a development kit for Dioxus that provides abstractions for your Dioxus app. Abstractions included are notifications, clipboard, geolocation and storage with more to come!

Features

  • Geolocation - (Web, Windows)
  • Storage - (Web, Desktop)
  • Clipboard - (Desktop)
  • Notifications - (Desktop)
  • Color Scheme - (Web)
  • i18n
  • Utility Hooks
    • use_channel
    • use_interval
  • Camera
  • WiFi
  • Bluetooth

Geolocation example:

use dioxus_sdk::geolocation::{
    init_geolocator, use_geolocation, PowerMode
};

fn app() -> Element {
    let geolocator = init_geolocator(PowerMode::High).unwrap();
    let coords = use_geolocation();

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

Platform Support

Clipboard

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

sudo apt-get install xorg-dev

Usage

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

[dependencies]
dioxus-sdk=  { version = "0.5", features = [] }

License

This project is licensed under the MIT license.

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

Dependencies

~3–44MB
~675K SLoC