| Crates.io | waterui-text |
| lib.rs | waterui-text |
| version | 0.1.0 |
| created_at | 2025-09-07 14:22:27.391962+00 |
| updated_at | 2025-09-07 14:22:27.391962+00 |
| description | Text and typography components for WaterUI |
| homepage | |
| repository | https://github.com/water-rs/waterui |
| max_upload_size | |
| id | 1828172 |
| size | 19,092 |
A cross-platform UI framework for Rust with cross-platform native rendering
use waterui::prelude::*;
pub fn counter() -> impl View {
let count = Binding::int(0);
let doubled = count.map(|n| n * 2);
vstack((
text!("Count: {count}"),
text!("Doubled: {doubled}")
.font_size(20)
.foreground_color(Color::gray()),
hstack((
button("Increment")
.action(move || count.increment(1)),
button("Reset")
.action(move || count.set(0))
.foreground_color(Color::red()),
))
.spacing(10),
))
.padding(20)
.spacing(15)
}
Check it here.