Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/audulus/rui
/ button_example
Function
button_example
examples/gallery.rs:3–8 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
1
use rui::*;
2
3
fn button_example() -> impl View {
4
hstack((
5
caption(
"button"
),
6
button(
"press me"
, |_| println!(
"pressed"
)),
7
))
8
}
9
10
fn slider_example() -> impl View {
11
hstack((caption(
"slider"
), state(|| 0.5, |s, _| hslider(s))))
Callers
1
main
Function · 0.85
Calls
3
hstack
Function · 0.85
caption
Function · 0.85
button
Function · 0.85
Tested by
no test coverage detected