1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
#![doc(
html_logo_url = "https://freyaui.dev/logo.svg",
html_favicon_url = "https://freyaui.dev/logo.svg"
)]
//! # Freya
//! Build native & cross-platform GUI applications using 🦀 Rust.
//!
//! Powered by [🧬 Dioxus](https://dioxuslabs.com) and [🎨 Skia](https://skia.org/).
//! ```no_run
//! use freya::prelude::*;
//!
//! fn main(){
//! launch(app);
//! }
//!
//! fn app(cx: Scope) -> Element {
//! let mut count = use_state(cx, || 0);
//!
//! render!(
//! rect {
//! height: "100%",
//! width: "100%",
//! background: "rgb(35, 35, 35)",
//! color: "white",
//! padding: "12",
//! onclick: move |_| count += 1,
//! label { "Click to increase -> {count}" }
//! }
//! )
//! }
//!
//! ```
//!
//! ## Features flags
//!
//! - `devtools`: Enables a side panel to inspect your App tree, styles and computed layout.
//! - `use_camera`: Enables the `use_camera` hook.
//! - `log`: Enables internal logs.
//!
/// Dioxus library.
pub use dioxus;
/// Launch your application.
pub mod launch;
/// Collection of basic components.
pub mod components {
pub use freya_components::*;
}
/// Useful utilities.
pub mod hooks {
pub use freya_hooks::*;
}
/// Common data structures and utils.
pub mod common {
pub use freya_common::*;
}
/// Events and their data.
pub use freya_elements::events;
/// Elements namespace and attributes.
pub use freya_elements::elements;
/// Hotreload configuration.
pub mod hotreload {
pub use freya_elements::elements::FreyaCtx;
}
pub use torin;
/// Useful imports.
pub mod prelude {
pub use dioxus_core::prelude::*;
pub use dioxus_core_macro::*;
pub use dioxus_hooks::*;
pub use dioxus_hot_reload::{self, hot_reload_init, Config};
pub use crate::launch::*;
pub use freya_components::*;
pub use freya_elements::elements as dioxus_elements;
pub use freya_elements::events::*;
pub use freya_elements::*;
pub use freya_hooks::*;
pub use freya_node_state::{bytes_to_data, CustomAttributeValues};
pub use freya_renderer::*;
pub use torin::prelude::*;
}