Widgets

Interactive controls and display elements for your UI.

Text

Create text labels and modify their appearance using setter functions.

let label: View = text_view("Hello World");
text_set_font_size(label, 24.0);
text_set_font_weight(label, 700);
text_set_color(label, color_white());

Button

Create buttons and attach event handlers.

let btn: View = button_view("Submit");
button_set_style(btn, color_primary(), color_accent(), color_error());

Inputs

Controls like sliders and toggles use explicit construct functions.

let tgl: View = toggle_view("Enable AI", true);

let sld: View = slider_view(0.0, 100.0, 50.0);