#web #user-interface #declarative

viewy

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

110 releases (54 stable)

Uses new Rust 2021

new 1.4.27 Jun 29, 2022
1.4.22 May 23, 2022
1.4.10 Mar 29, 2022
1.2.13 Dec 16, 2021
0.1.0 Mar 22, 2021

#3 in #declarative

Download history 244/week @ 2022-03-11 470/week @ 2022-03-18 58/week @ 2022-03-25 17/week @ 2022-04-01 125/week @ 2022-04-08 19/week @ 2022-04-15 104/week @ 2022-04-22 764/week @ 2022-04-29 834/week @ 2022-05-06 1744/week @ 2022-05-13 414/week @ 2022-05-20 804/week @ 2022-05-27 961/week @ 2022-06-03 57/week @ 2022-06-10 51/week @ 2022-06-17 61/week @ 2022-06-24

1,235 downloads per month

MIT license

445KB
4.5K SLoC

Rust 4K SLoC // 0.0% comments JavaScript 635 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 (planned)
  • 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() -> Html<String> {
   Html({
       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

~7MB
~167K SLoC