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

viewy

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

194 releases (stable)

1.13.1 Oct 29, 2024
1.12.7-beta.1 Aug 30, 2024
1.12.5-alpha.2 Jul 11, 2024
1.10.2 Mar 11, 2024
0.1.0 Mar 22, 2021

#413 in GUI

Download history 3/week @ 2024-07-15 289/week @ 2024-08-19 91/week @ 2024-08-26 116/week @ 2024-09-02 8/week @ 2024-09-09 354/week @ 2024-09-16 186/week @ 2024-09-23 93/week @ 2024-09-30 4/week @ 2024-10-07 139/week @ 2024-10-28

146 downloads per month

MIT license

300KB
6K SLoC

Rust 5.5K SLoC // 0.0% comments JavaScript 822 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

~21MB
~414K SLoC