#web #user-interface #declarative

viewy

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

178 releases (stable)

new 1.10.1 Feb 16, 2024
1.9.3 Jan 29, 2024
1.8.14 Dec 6, 2023
1.8.13 Nov 21, 2023
0.1.0 Mar 22, 2021

#79 in GUI

Download history 79/week @ 2023-10-26 71/week @ 2023-11-02 40/week @ 2023-11-09 249/week @ 2023-11-16 195/week @ 2023-11-23 336/week @ 2023-11-30 175/week @ 2023-12-07 182/week @ 2023-12-14 347/week @ 2023-12-21 2/week @ 2023-12-28 176/week @ 2024-01-04 38/week @ 2024-01-11 368/week @ 2024-01-18 221/week @ 2024-01-25 184/week @ 2024-02-01 6/week @ 2024-02-08

781 downloads per month

MIT license

525KB
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

~19MB
~384K SLoC