A GPU-accelerated, reactive UI framework for Rust. Fine-grained signals, declarative views, and a wgpu renderer that targets desktop, mobile, and the browser from one source tree.
1use blinc_app::prelude::*; 2use blinc_app::windowed::{WindowedApp, WindowedContext}; 3 4fn main() -> Result<()> { 5 WindowedApp::run(WindowConfig::default(), |ctx| { 6 div() 7 .w(ctx.width) 8 .h(ctx.height) 9 .bg(Color::rgba(0.1, 0.1, 0.15, 1.0)) 10 .flex_center() 11 .child( 12 div() 13 .glass() 14 .rounded(16.0) 15 .p(32.0) 16 .child( 17 text("Hello, Blinc!").size(24.0).color(Color::WHITE) 18 ) 19 ) 20 }) 21}
1component App { 2 style { // CSS styles syntax you are already familiar with 3 .stage { width: 100%; height: 100%; background: #1a1a26; 4 align-items: center; justify-content: center } 5 .glass { backdrop-filter: glass; border-radius: 16; padding: 32 } 6 .title { color: #ffffff; font-size: 24 } 7 } 8 9 view { // declarative UI tree — components nest like the rendered output 10 Div(class = "stage") { 11 Div(class = "glass") { 12 Text("Hello, Blinc!", class = "title") 13 } 14 } 15 } 16} 17 18view { App() }