#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

204 releases (stable)

1.13.13 Jan 31, 2025
1.13.7 Dec 10, 2024
1.13.4 Nov 18, 2024
1.12.5-alpha.2 Jul 11, 2024
0.1.0 Mar 22, 2021

#359 in GUI

Download history 139/week @ 2024-10-28 7/week @ 2024-11-04 211/week @ 2024-11-11 188/week @ 2024-11-18 6/week @ 2024-11-25 793/week @ 2024-12-02 1041/week @ 2024-12-09 47/week @ 2024-12-16 143/week @ 2024-12-23 145/week @ 2024-12-30 137/week @ 2025-01-06 152/week @ 2025-01-13 14/week @ 2025-01-20 448/week @ 2025-01-27 69/week @ 2025-02-03

696 downloads per month

MIT license

300KB
6.5K SLoC

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