UI.Properties
luastra/uiUI.Properties is the validated map stored on a declarative UI node after constructor checks. It carries only serializable, admitted property values that host renderers can interpret consistently.
Mental model
This is a declarative node: app.render describes it again from current state, while the host matches its stable id to the existing view.
Before you use it
Add luastra/ui to this module's dependencies in luastra.json, then import it with require("luastra/ui"). The project must declare the ui.render capability. app.render must return one UI.Screen root; place this node inside that tree rather than invoking it for a hidden side effect.
How it fits
This type exists during Luau analysis and documents values used by UI constructors or app.render. It is erased from the runtime bundle as a static type.
When to use it
Use UI.Properties when a generic helper needs to inspect or pass a validated node property map. Most applications should prefer the named fields of individual UI constructors instead of constructing this map directly.
Fields or definition
| Parameter | Type / values | Description |
|---|---|---|
| [string] | any | Index signature mapping any; every key and value must satisfy this contract. |
Children and layout
This component does not accept arbitrary child nodes; named parameters provide its content.
Accessibility and keyboard
A stable id, logical render-tree order, and visible labels preserve predictable keyboard and screen-reader navigation.
Common mistakes
- Using a duplicate id or an uppercase path segment.
- Passing a shared-group parameter that is not listed on this component page.
Returns
UI.Node — a declarative node in the new render tree.
What happens next
A checked annotation that matches the exact exported declaration.
Failures and fixes
If the annotation fails, compare the value with the exact declaration and the producing or consuming function.
Availability
Source API in 0.5.0-alpha; the public installer targets 0.5.0-alpha. Verify host-specific behavior against the selected SDK.
Exact declaration
export type Properties = { [string]: any }