| Crates.io | viewy |
| lib.rs | viewy |
| version | 1.13.33 |
| created_at | 2021-01-28 10:47:50.441812+00 |
| updated_at | 2025-07-10 14:38:33.967798+00 |
| description | A web UI toolkit that combine the advantages of a design system and an ui library. |
| homepage | |
| repository | https://github.com/strowbeary/viewy-rs |
| max_upload_size | |
| id | 347637 |
| size | 496,861 |
A UI toolkit that combine the advantages of a design system and an ui library.
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])
}