#declarative-ui #ui #web #declarative

viewy

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

208 releases (stable)

Uses new Rust 2024

new 1.13.17 Apr 24, 2025
1.13.13 Jan 31, 2025
1.13.7 Dec 10, 2024
1.13.4 Nov 18, 2024
0.1.0 Mar 22, 2021

#381 in GUI

Download history 193/week @ 2025-01-03 156/week @ 2025-01-10 41/week @ 2025-01-17 64/week @ 2025-01-24 434/week @ 2025-01-31 23/week @ 2025-02-07 16/week @ 2025-02-14 2/week @ 2025-02-21 2/week @ 2025-02-28 1/week @ 2025-03-07 2/week @ 2025-03-14 5/week @ 2025-03-21 1/week @ 2025-04-04 207/week @ 2025-04-11 138/week @ 2025-04-18

346 downloads per month

MIT license

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

~19–28MB
~479K SLoC