rayquiro.ui
rayquiro.ui is the higher-level Windows UI framework built into RayQuiro.
It is best for:
- installers
- launchers
- release dashboards
- setup flows
- status screens with one or two actions
Import
import rayquiro.ui as ui;
Runtime Model
You build a screen in steps:
- create the window with
ui.init(...) - optionally apply a theme with
ui.style(...) - fill content with
hero,status,info,text - add buttons with
ui.action(...)orui.button(...) - call
ui.run()
ui.run() returns the selected action id.
API Reference
ui.init(title, width, height)
Creates the window and resets the current content.
Defaults:
- title:
"RayQuiro" - width:
920 - height:
620
ui.style(cssLikeText)
Applies a CSS-like theme string.
ui.hero(title, subtitle)
Sets the main hero header area.
ui.status(title, body)
Sets the status box content.
ui.info(label, value)
Adds a two-column info row.
ui.text(text, role)
Adds a text block.
Common roles:
"body""muted""caption""title"
ui.action(id, label, variant)
ui.button(id, label, variant)
Adds a clickable action button.
Common variants:
"primary""secondary"
ui.button(...) is an alias of ui.action(...).
ui.run()
Shows the window and blocks until the user closes it or clicks a button.
Returns the selected action id as a string.
Full Example
import rayquiro.ui as ui;
var action = "close";
ui.init("RayQuiro Installer", 960, 640);
ui.style("
window { background: #08111d; background-end: #0f766e; font: Segoe UI; }
card { background: #f7fbff; border: #d6e6f4; radius: 30; max-width: 860; }
badge { background: #0f9bd7; color: #ffffff; }
title { color: #0b1d32; size: 38; align: center; }
subtitle { color: #4b617f; size: 20; align: center; }
status-box { background: #e8f4fb; border: #cfe4f1; }
status-title { color: #14324f; size: 22; align: left; }
status-body { color: #3e5670; size: 18; align: left; }
text { color: #22374c; size: 18; align: left; }
text.muted { color: #68819b; size: 17; }
button.primary { background: #0f766e; background-hover: #11998f; color: #ffffff; radius: 20; align: center; }
button.secondary { background: #edf4f8; border: #d2e0ea; color: #14324f; radius: 20; align: center; }
");
ui.hero("RayQuiro 0.0.1", "Installer and launcher UI built in RayQuiro.");
ui.status("Ready", "Choose what to do next.");
ui.info("Runtime", "Interpreter");
ui.info("Project", "RayQuiro");
ui.text("You can fully theme this screen from RayQuiro code.", "body");
ui.text("The button result comes back from ui.run().", "muted");
ui.button("download", "Download", "primary");
ui.button("close", "Close", "secondary");
action = ui.run();
print("selected action:", action);
Style Selectors
The current CSS-like selectors are:
windowcardbadgetitleherosubtitlestatus-boxstatus-titlestatus-bodylabelvaluetexttext.bodytext.mutedbuttonbutton.primarybutton.secondary
Supported Style Properties
window
backgroundbackground-endfont
card
backgroundborderradiusmax-width
badge
backgroundcolor
title and hero
colorsizealign
subtitle
colorsizealign
status-box
backgroundborder
status-title
colorsizealign
status-body
colorsizealign
label
colorsize
value
colorsize
text and text.body
colorsizealign
text.muted
colorsize
button and button.primary
backgroundbackground-hovercolorborderradiusalign
button.secondary
backgroundbackground-hovercolorborderradiusalign
Alignment Values
Supported align values:
leftcenterright
Notes
rayquiro.uiis Windows-first in0.0.1.- The runtime centers the card layout automatically.
ui.run()returns"close"if the window is simply closed.