Crates.io | dioxus-std |
lib.rs | dioxus-std |
version | 0.5.0 |
source | src |
created_at | 2023-04-13 19:11:38.131956 |
updated_at | 2024-04-05 13:08:58.481068 |
description | Platform agnostic library for supercharging your productivity with Dioxus |
homepage | https://dioxuslabs.com |
repository | https://github.com/DioxusLabs/dioxus-std/ |
max_upload_size | |
id | 838617 |
size | 80,602 |
[!NOTE] This crate is no longer updated as it has been moved from
dioxus-std
todioxus-sdk
as of April 4th, 2024.
A platform agnostic library for supercharging your productivity with Dioxus.
This library is still under development. Expect breaking changes!
dioxus-std
is a Dioxus standard library that provides abstractions for your Dioxus app. Abstractions included are notifications, clipboard, geolocation and storage with more to come!
Features
Geolocation example:
use dioxus_std::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}" } )
}
}
}
On linux you need the x11 library to use the clipboard abstraction:
sudo apt-get install xorg-dev
You can add dioxus-std
to your application by adding it to your dependencies.
[dependencies]
dioxus-std = { version = "0.5", features = [] }
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.