waterui-text

Crates.iowaterui-text
lib.rswaterui-text
version0.1.0
created_at2025-09-07 14:22:27.391962+00
updated_at2025-09-07 14:22:27.391962+00
descriptionText and typography components for WaterUI
homepage
repositoryhttps://github.com/water-rs/waterui
max_upload_size
id1828172
size19,092
Lexo Liu (lexoliu)

documentation

README

WaterUI 🌊

A cross-platform UI framework for Rust with cross-platform native rendering

Counter example

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)
}

✨ Features

  • True native rendering - Uses SwiftUI on Apple platforms (yes, even visionOS/watchOS/widgets!)
  • Vue-like fine-grained reactivity - Allows efficient updates without virtual DOM
  • Type-safe from top to bottom - Leverage Rust's type system fully
  • Declarative & reactive - Familiar to SwiftUI/React developers
  • Cross-platform - Windows, Linux, macOS, iOS, Android (Web coming soon)

🧑‍🏫 Demo (SwiftUI backend)

Check it here.

📚 Documentation

Commit count: 183

cargo fmt