Skip to main content
Version: 0.1.1

rayquiro.ui

rayquiro.ui is a high-level UI native module designed for styling applications, setup guides, installers, and interactive launchers. It provides a structured card/panel layout with built-in styling variables.


🚀 Installation

Install globally on your machine:

rqio install rayquiro.ui

Or install locally in your project folder:

rqio install rayquiro.ui --local

🌐 Import

import rayquiro.ui as ui;

🛠️ API Functions

ui.init(title, width, height)

Initializes the main UI window layout.

  • title (string) — Window title.
  • width (number) — Width of the window in pixels.
  • height (number) — Height of the window in pixels.

ui.style(cssText)

Applies styling properties using CSS-like syntax.

  • cssText (string) — Selector definitions.
  • Example Selectors & Properties:
    • window — The main window area (background, background-end for gradients).
    • card — Main centered container card (background, border, radius, padding, max-width).
    • badge — Top badge badge container (background, color).
    • title / subtitle — Main text headings (color, size).
    • status-box — Informational status message box (background, border).
    • button.primary / button.secondary — Interactive action buttons (background, background-hover, color, radius).
    • text / text.muted — Inline text descriptions (color, size).

ui.hero(title, subtitle)

Adds a hero title section at the top of the card.

  • title (string) — Main big title text.
  • subtitle (string) — Explanatory subtitle text.

ui.status(title, body)

Renders an informational status message box in the middle.

  • title (string) — Status header (e.g. "Copying files...").
  • body (string) — Explanatory status body text.

ui.info(label, value)

Adds a key-value data row. Ideal for displaying stats, progress details, or path configurations.

  • label (string) — Left-aligned label (e.g. "Install Root").
  • value (string) — Right-aligned value (e.g. "C:/rayquiro").

ui.text(text, role)

Adds raw text block content.

  • text (string) — Content text.
  • role (string, optional) — Text role style (e.g. "body", "muted").

ui.action(id, label, variant) or ui.button(id, label, variant)

Creates an interactive button.

  • id (string) — The unique action ID returned by ui.run() if this button is clicked.
  • label (string) — The button label text.
  • variant (string) — The button style variant ("primary", "secondary").

ui.run()

Renders the window layout and blocks execution until an action is selected.

  • Returns: string — The id of the clicked button or action.