Crates.io | hobo_css |
lib.rs | hobo_css |
version | 0.4.0 |
source | src |
created_at | 2020-07-21 15:24:02.514526 |
updated_at | 2023-07-27 13:39:50.974113 |
description | hobo is a Rust frontend framework |
homepage | |
repository | https://github.com/grdigital/hobo |
max_upload_size | |
id | 267655 |
size | 137,375 |
hobo is an opinionated, batteries-included Rust frontend framework. Works on stable Rust.
STILL WIP although used in production by GR Digital.
Check out the Book!
web_sys::HtmlElement
pub use hobo::{
prelude::*,
create as e,
signals::signal::{Mutable, SignalExt}
};
fn counter() -> impl hobo::AsElement {
let counter = Mutable::new(0);
e::div()
.class((
css::display!(flex),
css::flex_direction!(column),
css::width!(400 px),
))
.child(e::div()
.text_signal(counter.signal().map(|value| {
format!("Counter value is: {value}")
}))
)
.child(e::button()
.text("increment")
.on_click(move |_| *counter.lock_mut() += 1)
)
}