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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//! # Freyr UI Components Library for Dioxus.
//!
//! This crate provides a set of customizable UI components for use in Dioxus projects.
//! It allows developers to easily integrate and style components such as navbars, carousels and buttons,
//! with flexible configuration options for color schemes and layouts. Just make it your own!
//!
//! ## Why the name Freyr?
//!
//! Freyr is the norse god of fertility and prosperity and is known for his beauty. Your Dioxus web app should also look good.
//!
//! > ### **Warning:**
//! > **_New components will be added, and some features that already exist may change._**
//! > **Freyr was created out of fun to help me reuse the components I had already used in other project, while I was learning _Rust_ and Dioxus. So I also hope it's going to help you too.**
//!
//! ### **Features**
//! - [x] Buttons
//! - [x] Tabs
//! - [x] Navbar
//! - [x] Accordion
//! - [x] Carousel
//! - [x] Dropdown
//! - [x] Dialog
//! - [x] Spinner
//! - [x] Card
//!
//! All those components have more features than you think. For more information about them please chack them [here](https://docs.rs/freyr/latest/freyr/#functions).
//! ## Key Features
//! - Full customization of colors, sizes, and layouts using configuration structs and enums.
//! - Easy integration into Dioxus web projects.
//!
//! ## Example Usage
//!
//! ```rust
//! #![allow(non_snake_case)]
//! use dioxus::prelude::*;
//! use freyr::prelude::*;
//!
//! #[derive(Clone, Routable, Debug, PartialEq)]
//! enum Route {
//! #[layout(Navigation)]
//! #[route("/")]
//! Home {},
//! }
//!
//!
//! #[component]
//! fn Navigation() -> Element {
//! let navbar_config = NavbarConfig {
//! background_color: ColorScheme::Dark,
//! nav_header: Some(String::from("Freyr")),
//! orientation: Some(Orientation::Center),
//! header_color: HeaderColor::Light,
//! nav_items: vec!["Home".to_string(), "About".to_string(), "Contact".to_string()],
//! nav_links: vec!["/".to_string(), "/about".to_string(), "/contact".to_string()],
//! nav_item_color: NavItemsColor::Custom("#990000"),
//! icon_color: IconColor::Custom("#99cc00"), // Sets the color for both the hamburger SVG and the cross SVG.
//! };
//!
//! rsx! {
//! Navbar { navbar_config }
//! Outlet::<Route> {}
//! }
//! }
//!
//! #[component]
//! fn Home() -> Element {
//! rsx! {
//! div {
//! BasicButton { color: ButtonColor::Freyr, label: String::from("Go Home"), link: ButtonUrl { url: "/".to_string() } }
//! BasicButton { color: ButtonColor::Primary, label: String::from("Go to About"), link: ButtonUrl { url: "/about".to_string() } }
//! // Here the routing is made optional
//! BasicButton { color: ButtonColor::Freyr, label: String::from("Hello") }
//!
//! }
//! }
//! }
//!
//! #[component]
//! fn Dropdown() -> Element {
//! let dropdown_items = vec![
//! DropdownItem { label: String::from("Freyr"), url: String::from("/") },
//! DropdownItem { label: "See freyr's components".to_string(), url: "/components".to_string() },
//! DropdownItem { label: "Learn about dioxus".to_string(), url: "/learn-dioxus".to_string() },
//! ];
//!
//! let config_dropdown = DropdownConfig {
//! title: String::from("Menu"),
//! label: dropdown_items,
//! background_color: DropdownColorScheme::Freyr,
//! title_color: DropdownTitleColor::Light,
//! labels_color: DropdownLabelsColor::Dark,
//! hover_color: DropdownHoverColor::Custom("#03346E"),
//! };
//! rsx! {
//! div {
//! DropdownMenu { config_dropdown }
//! }
//! }
//! }
//! ```
//!
//! For more documentation about the actual components, please go to the [functions](https://docs.rs/freyr/latest/freyr/#functions).
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;