A declarative UI toolkit for Rugo.
Build native desktop apps with do...end blocks, reactive state, and zero ceremony.
require "github.com/rubiojr/cute@v0.1.1"
cute.app("Counter", 400, 300) do
count = cute.state(0)
cute.vbox do
lbl = cute.label("Clicked: 0 times")
count.on(fn(v) lbl.set_text("Clicked: #{v} times") end)
cute.button("Click Me") do
count.set(count.get() + 1)
end
cute.hbox do
cute.button("Reset") do
count.set(0)
end
cute.button("Quit") do
cute.quit()
end
end
end
cute.shortcut("Ctrl+Q", fn() cute.quit() end)
end- Getting Started — Prerequisites, hello world, build & run
- Layouts & Widgets — vbox, hbox, label, button, input, and more
- Reactive State —
state(),.get(),.set(),.on() - Styling — Stylesheets,
style()helper,props() - Events & Shortcuts — Callbacks, keyboard shortcuts, timers
- Threading — Background work with
spawnandcute.ui - API Reference — Complete function reference
- Counter — Minimal app with reactive state
- Hacker News Reader — Full app with networking, lists, and threading