#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

199 releases (stable)

new 1.13.7 Dec 10, 2024
1.13.4 Nov 18, 2024
1.12.5-alpha.2 Jul 11, 2024
1.10.2 Mar 11, 2024
0.1.0 Mar 22, 2021

#239 in GUI

Download history 28/week @ 2024-08-23 91/week @ 2024-08-30 122/week @ 2024-09-06 270/week @ 2024-09-13 222/week @ 2024-09-20 124/week @ 2024-09-27 23/week @ 2024-10-04 123/week @ 2024-10-25 21/week @ 2024-11-01 2/week @ 2024-11-08 370/week @ 2024-11-15 33/week @ 2024-11-22 507/week @ 2024-11-29 1607/week @ 2024-12-06

2,520 downloads per month

MIT license

300KB
6K SLoC

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