freya/lib.rs
1#![doc(
2 html_logo_url = "https://freyaui.dev/logo.svg",
3 html_favicon_url = "https://freyaui.dev/logo.svg"
4)]
5//! # Freya
6//!
7//! **Freya** is a declarative, cross-platform GUI Rust library, powered by 🧬 [Dioxus](https://dioxuslabs.com) and 🎨 [Skia](https://skia.org/).
8//!
9//! **It does not use any web tech**, check the [Differences with Dioxus](https://github.com/marc2332/freya/tree/main?tab=readme-ov-file#differences-with-dioxus).
10//!
11//! ### Basics
12//! - [Introduction](self::_docs::introduction)
13//! - [Dioxus Fundamentals](self::_docs::dioxus_fundamentals)
14//! - [UI](self::_docs::ui)
15//! - [Elements Overview](self::_docs::elements)
16//! - [Components](self::_docs::components_and_props)
17//! - [Hooks](self::_docs::hooks)
18//! - [State Management](self::_docs::state_management)
19//! - [Signals](self::_docs::state_management::signals)
20//! - [Global Signals](self::_docs::state_management::global_signals)
21//! - [Lifecycle](self::_docs::state_management::lifecycle)
22//! - [Context](self::_docs::state_management::context)
23//! - [Memoization](self::_docs::state_management::memoization)
24//! - [Async Tasks](self::_docs::async_tasks)
25//!
26//! ### Learn
27//! - [Development Setup](self::_docs::development_setup)
28//! - [Theming](self::_docs::theming)
29//! - [i18n](self::_docs::i18n)
30//! - [Accessibility](self::hooks::use_focus)
31//! - [Router](self::_docs::router)
32//! - [Native Router](self::_docs::router::native_router)
33//! - [Third Party State Managemement](self::_docs::third_party_state)
34//! - [Devtools](self::_docs::devtools)
35//! - [Performance Tips](self::_docs::performance)
36//!
37//! ### Advanced
38//! - [Animations](self::hooks::use_animation)
39//! - [Text Editing](self::hooks::use_editable)
40//! - [Unit Testing of Components](freya_testing)
41//!
42//! ### API References
43//! - [Elements and attributes](self::elements#structs)
44//! - [Events](self::events#functions)
45//! - [Built-in Components](self::components)
46//! - [Built-in Components Gallery](self::components::gallery)
47//! - [Built-in Hooks](self::hooks)
48//!
49//! ## Features flags
50//!
51//! - `devtools`: enables a side panel to inspect your App tree, styles and computed layout.
52//! - `use_camera`: enables the `use_camera` hook.
53
54/// Freya docs.
55#[cfg(doc)]
56pub mod _docs;
57
58/// Dioxus library.
59pub use dioxus;
60pub use dioxus_core;
61#[cfg(doc)]
62pub use freya_elements::_docs as elements_docs;
63
64/// Launch your app.
65pub mod launch;
66
67/// Collection of components.
68///
69/// Go to [Gallery](freya_components::gallery) to see previews of the components.
70pub mod components {
71 pub use freya_components::*;
72}
73
74/// Useful utilities.
75pub mod hooks {
76 pub use freya_hooks::*;
77}
78
79/// Common data structures and utils.
80pub mod common {
81 pub use freya_core::*;
82}
83
84/// Core APIs.
85pub mod core {
86 pub use freya_core::*;
87}
88
89/// Elements, attributes and events definitions.
90pub use freya_elements::elements;
91/// Events data.
92pub use freya_elements::events;
93pub use torin;
94
95pub mod plugins;
96
97/// Useful imports.
98pub mod prelude {
99 pub use dioxus_core::{
100 prelude::*,
101 {
102 self,
103 },
104 };
105 pub use dioxus_core_macro::*;
106 pub use dioxus_hooks::*;
107 pub use dioxus_signals::*;
108 pub use freya_components::*;
109 pub use freya_core::{
110 custom_attributes::{
111 dynamic_bytes,
112 static_bytes,
113 CustomAttributeValues,
114 },
115 platform::*,
116 platform_state::*,
117 types::AccessibilityId,
118 };
119 pub use freya_elements::{
120 self as dioxus_elements,
121 events::*,
122 };
123 pub use freya_hooks::*;
124 pub use freya_winit::*;
125 pub use torin::prelude::*;
126
127 pub use crate::{
128 launch::*,
129 plugins::*,
130 };
131}