#dioxus #hook #dom #standard #desktop-applications #gui

dioxus-sdk

Platform agnostic library for supercharging your productivity with Dioxus

4 releases (2 breaking)

new 0.6.0 Dec 7, 2024
0.5.1 Oct 27, 2024
0.5.0 Apr 5, 2024
0.0.0 Apr 4, 2024

#138 in Operating systems

Download history 354/week @ 2024-08-21 426/week @ 2024-08-28 292/week @ 2024-09-04 440/week @ 2024-09-11 249/week @ 2024-09-18 302/week @ 2024-09-25 272/week @ 2024-10-02 262/week @ 2024-10-09 306/week @ 2024-10-16 284/week @ 2024-10-23 129/week @ 2024-10-30 90/week @ 2024-11-06 120/week @ 2024-11-13 175/week @ 2024-11-20 132/week @ 2024-11-27 268/week @ 2024-12-04

703 downloads per month
Used in 8 crates (2 directly)

MIT/Apache

93KB
2K 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)
  • Utility Hooks
    • use_channel
    • use_window_size
    • use_interval
    • use_debounce
    • use_timeout
  • 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.6", features = [] }

License

This project is dual licensed under the MIT and Apache 2.0 licenses.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in dioxus-sdk by you, shall be licensed as MIT or Apache 2.0, without any additional terms or conditions.

Dependencies

~3–59MB
~1M SLoC