#web-ui #declarative-ui #web #declarative #user-interface #ui-toolkit #ui

viewy

A web UI toolkit that combine the advantages of a design system and an ui library

186 releases (stable)

1.12.5-alpha.2 Jul 11, 2024
1.12.4 Jun 20, 2024
1.10.2 Mar 11, 2024
1.8.14 Dec 6, 2023
0.1.0 Mar 22, 2021

#245 in GUI

Download history 288/week @ 2024-03-29 57/week @ 2024-04-05 197/week @ 2024-04-12 1220/week @ 2024-04-19 141/week @ 2024-04-26 17/week @ 2024-05-03 3/week @ 2024-05-17 1/week @ 2024-05-24 1/week @ 2024-06-07 111/week @ 2024-06-14 54/week @ 2024-06-21 12/week @ 2024-06-28 233/week @ 2024-07-05 51/week @ 2024-07-12

459 downloads per month

MIT license

530KB
6.5K SLoC

Rust 5.5K SLoC // 0.0% comments JavaScript 1K SLoC // 0.0% comments

Viewy

A UI toolkit that combine the advantages of a design system and an ui library.

  • Customizable theme via config file
  • For small and more complex projects

"Hello, World!" example program (rocket.rs)

use viewy::*;
use viewy::components::*;
#[macro_use] extern crate rocket;

pub fn default_layout() -> Box<dyn Fn(Box<dyn Renderable>) -> Box<dyn Renderable>> {
    Box::new(move |content| Box::new({
        content
    }))
}

#[get("/")]
fn index() -> RawHtml<String> {
   RawHtml({
       Page::new(
           &format!("{} – Viewy", "Hello World"),
           &default_layout(),
           {
               Text::new("Hello world", TextStyle::LargeTitle)
           }
       )
           .compile(RenderMode::Complete)
   })
}

#[launch]
fn rocket() -> _ {
    rocket::build().mount("/", routes![index])
}

Dependencies

~20MB
~397K SLoC