7 releases

new 0.1.9 Dec 14, 2024
0.1.8 Dec 13, 2024
0.1.7 Nov 21, 2024
0.1.4 Oct 10, 2024

#199 in Images

Download history 573/week @ 2024-10-05 44/week @ 2024-10-12 2/week @ 2024-10-19 128/week @ 2024-11-02 13/week @ 2024-11-09 233/week @ 2024-11-16 55/week @ 2024-11-23 4/week @ 2024-11-30 44/week @ 2024-12-07

344 downloads per month

MIT license

79KB
2K SLoC

Freyr UI web Components Library for Dioxus.

Why the name Freyr?

Freyr is the norse god of fertility and prosperity and is known for his beauty. Your Dioxus app should also look good, even beautiful.

First:

cargo add freyr

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 and buttons, with flexible configuration options for color schemes, layouts, and responsiveness.

Warning:

**This component is in the early stage of development. Components may change. If you are using Dioxus version 0.5, please download the version 0.1.4, else use the highest one.

Components

  • BasicButton: A customizable button with color options, hover effects, and more.
  • Navbar: A fully customizable navigation bar, custom colors, and responsive layouts.
  • NavbarWithLogo: A fully customizable navigation bar, custom colors, and responsive layouts and with an image logo.
  • NavbarDropdown: A fully customizable navigation bar, custom colors, and responsive layouts and with a dropdown menu included.
  • Dropdown: A dropdown menu with customizable background colors and labels colors.
  • Carousel: There are three carousel at the moment, the CarouselSimple, the CarouselWithTimer, and the CarouselWithNumbers (meaning numbers instead of dots).
  • Tabs: You may use a standard Tabs component with a single text or a personalized one.
  • Accordion: Make your own or use a more standard one.

Example Usage (using the version 0.6.0 of Dioxus)

#![allow(non_snake_case)]
use freyr::prelude::*;
use dioxus::prelude::*;

#[component]
fn HomePage() -> Element {
   let navbar_config = NavbarConfig {
       background_color: ColorScheme::Freyr,
       nav_header: "Freyr".to_string(),
       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"),
   };

   rsx! {
        Navbar { navbar_config }

        div {
            style: "margin-top: 5em;",
            BasicButton { color: ButtonColor::Freyr, label: "Go Home", link: ButtonUrl { url: "/".to_string() } }
        }
    }
}

For more information and documentation about freyr, please go to docs.rs.

Dependencies

~18–26MB
~393K SLoC