UI.Input
luastra/uiThe author-facing constructor table combines a required semantic id, ordered UI.Node children and typed optional properties. Runtime validation additionally checks whether each property and child is supported by the selected component.
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.Input for a reusable constructor table. Known field types and the required id are checked statically; component-specific properties, vocabularies, numeric bounds, motion descriptors and child structure are validated at runtime. An explicit any value bypasses static checking.
Fields or definition
| Parameter | Type / values | Description |
|---|---|---|
| [number] | Node | Index signature mapping Node; every key and value must satisfy this contract. |
| id | string | Stable identifier used to correlate or address this value across operations. |
| accentColor | string? | Checked accentColor field of UI.Input; its exact admitted type is string?. |
| align | string? | Checked align field of UI.Input; its exact admitted type is string?. |
| appearance | string? | Checked appearance field of UI.Input; its exact admitted type is string?. |
| aspectRatio | number? | Checked aspectRatio field of UI.Input; its exact admitted type is number?. |
| autoComplete | string? | Checked autoComplete field of UI.Input; its exact admitted type is string?. |
| backgroundColor | string? | Checked backgroundColor field of UI.Input; its exact admitted type is string?. |
| busy | boolean? | Checked busy field of UI.Input; its exact admitted type is boolean?. |
| className | string? | Checked className field of UI.Input; its exact admitted type is string?. |
| code | string? | Stable machine-readable failure code suitable for branching and diagnostics. |
| columns | string? | Checked columns field of UI.Input; its exact admitted type is string?. |
| cornerRadius | number? | Checked cornerRadius field of UI.Input; its exact admitted type is number?. |
| count | number? | Checked count field of UI.Input; its exact admitted type is number?. |
| dangerColor | string? | Checked dangerColor field of UI.Input; its exact admitted type is string?. |
| depth | number? | Checked depth field of UI.Input; its exact admitted type is number?. |
| decorative | boolean? | Checked decorative field of UI.Input; its exact admitted type is boolean?. |
| description | string? | Checked description field of UI.Input; its exact admitted type is string?. |
| descriptionId | string? | Checked descriptionId field of UI.Input; its exact admitted type is string?. |
| disabled | boolean? | Checked disabled field of UI.Input; its exact admitted type is boolean?. |
| documentDescription | string? | Checked documentDescription field of UI.Input; its exact admitted type is string?. |
| documentLanguage | string? | Checked documentLanguage field of UI.Input; its exact admitted type is string?. |
| documentTitle | string? | Checked documentTitle field of UI.Input; its exact admitted type is string?. |
| enterKeyHint | string? | Checked enterKeyHint field of UI.Input; its exact admitted type is string?. |
| endBusy | boolean? | Checked endBusy field of UI.Input; its exact admitted type is boolean?. |
| estimatedItemSize | number? | Checked estimatedItemSize field of UI.Input; its exact admitted type is number?. |
| errorId | string? | Checked errorId field of UI.Input; its exact admitted type is string?. |
| external | boolean? | Checked external field of UI.Input; its exact admitted type is boolean?. |
| fill | string? | Checked fill field of UI.Input; its exact admitted type is string?. |
| fit | string? | Checked fit field of UI.Input; its exact admitted type is string?. |
| flow | string? | Checked flow field of UI.Input; its exact admitted type is string?. |
| gap | string? | Checked gap field of UI.Input; its exact admitted type is string?. |
| header | boolean? | Checked header field of UI.Input; its exact admitted type is boolean?. |
| height | number? | Checked height field of UI.Input; its exact admitted type is number?. |
| hidden | boolean? | Checked hidden field of UI.Input; its exact admitted type is boolean?. |
| href | string? | Checked href field of UI.Input; its exact admitted type is string?. |
| icon | string? | Checked icon field of UI.Input; its exact admitted type is string?. |
| initialFocus | string? | Checked initialFocus field of UI.Input; its exact admitted type is string?. |
| inputMode | string? | Checked inputMode field of UI.Input; its exact admitted type is string?. |
| inputType | string? | Checked inputType field of UI.Input; its exact admitted type is string?. |
| itemCount | number? | Checked itemCount field of UI.Input; its exact admitted type is number?. |
| itemOffset | number? | Checked itemOffset field of UI.Input; its exact admitted type is number?. |
| justify | string? | Checked justify field of UI.Input; its exact admitted type is string?. |
| label | string? | Checked label field of UI.Input; its exact admitted type is string?. |
| language | string? | Checked language field of UI.Input; its exact admitted type is string?. |
| layerState | string? | Checked layerState field of UI.Input; its exact admitted type is string?. |
| margin | string? | Checked margin field of UI.Input; its exact admitted type is string?. |
| marginBottom | string? | Checked marginBottom field of UI.Input; its exact admitted type is string?. |
| marginEnd | string? | Checked marginEnd field of UI.Input; its exact admitted type is string?. |
| marginStart | string? | Checked marginStart field of UI.Input; its exact admitted type is string?. |
| marginTop | string? | Checked marginTop field of UI.Input; its exact admitted type is string?. |
| marginX | string? | Checked marginX field of UI.Input; its exact admitted type is string?. |
| marginY | string? | Checked marginY field of UI.Input; its exact admitted type is string?. |
| maxVisible | number? | Checked maxVisible field of UI.Input; its exact admitted type is number?. |
| maximumLength | number? | Checked maximumLength field of UI.Input; its exact admitted type is number?. |
| mode | string? | Checked mode field of UI.Input; its exact admitted type is string?. |
| multiline | boolean? | Checked multiline field of UI.Input; its exact admitted type is boolean?. |
| motion | unknown | Checked motion field of UI.Input; its exact admitted type is unknown. |
| mutedColor | string? | Checked mutedColor field of UI.Input; its exact admitted type is string?. |
| nodeKind | string? | Checked nodeKind field of UI.Input; its exact admitted type is string?. |
| onDismiss | string? | Checked onDismiss field of UI.Input; its exact admitted type is string?. |
| onEndReached | string? | Checked onEndReached field of UI.Input; its exact admitted type is string?. |
| onInput | string? | Checked onInput field of UI.Input; its exact admitted type is string?. |
| onSubmit | string? | Checked onSubmit field of UI.Input; its exact admitted type is string?. |
| onStartReached | string? | Checked onStartReached field of UI.Input; its exact admitted type is string?. |
| onTap | string? | Checked onTap field of UI.Input; its exact admitted type is string?. |
| open | boolean? | Checked open field of UI.Input; its exact admitted type is boolean?. |
| orbitMotion | string? | Checked orbitMotion field of UI.Input; its exact admitted type is string?. |
| orbitTheme | string? | Checked orbitTheme field of UI.Input; its exact admitted type is string?. |
| overscan | number? | Checked overscan field of UI.Input; its exact admitted type is number?. |
| overflow | string? | Checked overflow field of UI.Input; its exact admitted type is string?. |
| padding | string? | Checked padding field of UI.Input; its exact admitted type is string?. |
| paddingBottom | string? | Checked paddingBottom field of UI.Input; its exact admitted type is string?. |
| paddingEnd | string? | Checked paddingEnd field of UI.Input; its exact admitted type is string?. |
| paddingStart | string? | Checked paddingStart field of UI.Input; its exact admitted type is string?. |
| paddingTop | string? | Checked paddingTop field of UI.Input; its exact admitted type is string?. |
| paddingX | string? | Checked paddingX field of UI.Input; its exact admitted type is string?. |
| paddingY | string? | Checked paddingY field of UI.Input; its exact admitted type is string?. |
| placeholder | (string | Assets.Image)? | Checked placeholder field of UI.Input; its exact admitted type is (string | Assets.Image)?. |
| placeholderColor | string? | Checked placeholderColor field of UI.Input; its exact admitted type is string?. |
| presentation | string? | Checked presentation field of UI.Input; its exact admitted type is string?. |
| pressed | boolean? | Checked pressed field of UI.Input; its exact admitted type is boolean?. |
| priority | number? | Checked priority field of UI.Input; its exact admitted type is number?. |
| query | string? | Decoded query values associated with a route entry. |
| relatedTo | { string }? | Checked relatedTo field of UI.Input; its exact admitted type is { string }?. |
| required | boolean? | Checked required field of UI.Input; its exact admitted type is boolean?. |
| responsive | boolean? | Checked responsive field of UI.Input; its exact admitted type is boolean?. |
| resultCount | number? | Checked resultCount field of UI.Input; its exact admitted type is number?. |
| ring | number? | Checked ring field of UI.Input; its exact admitted type is number?. |
| role | string? | Checked role field of UI.Input; its exact admitted type is string?. |
| scope | string? | Checked scope field of UI.Input; its exact admitted type is string?. |
| scroll | string? | Checked scroll field of UI.Input; its exact admitted type is string?. |
| selected | boolean? | Checked selected field of UI.Input; its exact admitted type is boolean?. |
| shape | string? | Checked shape field of UI.Input; its exact admitted type is string?. |
| signalIcon | string? | Checked signalIcon field of UI.Input; its exact admitted type is string?. |
| source | (string | Assets.Image | Content.Image)? | Checked source field of UI.Input; its exact admitted type is (string | Assets.Image | Content.Image)?. |
| onError | string? | Checked onError field of UI.Input; its exact admitted type is string?. |
| onLoad | string? | Checked onLoad field of UI.Input; its exact admitted type is string?. |
| status | string? | Checked status field of UI.Input; its exact admitted type is string?. |
| statusTone | string? | Checked statusTone field of UI.Input; its exact admitted type is string?. |
| startBusy | boolean? | Checked startBusy field of UI.Input; its exact admitted type is boolean?. |
| sticky | string? | Checked sticky field of UI.Input; its exact admitted type is string?. |
| stroke | string? | Checked stroke field of UI.Input; its exact admitted type is string?. |
| strokeWidth | number? | Checked strokeWidth field of UI.Input; its exact admitted type is number?. |
| successColor | string? | Checked successColor field of UI.Input; its exact admitted type is string?. |
| surface | string? | Checked surface field of UI.Input; its exact admitted type is string?. |
| surfaceColor | string? | Checked surfaceColor field of UI.Input; its exact admitted type is string?. |
| text | string? | Checked text field of UI.Input; its exact admitted type is string?. |
| textStyle | TextStyle? | Checked textStyle field of UI.Input; its exact admitted type is TextStyle?. |
| textAlign | string? | Checked textAlign field of UI.Input; its exact admitted type is string?. |
| textColor | string? | Checked textColor field of UI.Input; its exact admitted type is string?. |
| theme | Theme? | Checked theme field of UI.Input; its exact admitted type is Theme?. |
| title | string? | Checked title field of UI.Input; its exact admitted type is string?. |
| tone | string? | Checked tone field of UI.Input; its exact admitted type is string?. |
| totalCount | number? | Checked totalCount field of UI.Input; its exact admitted type is number?. |
| value | string? | Validated value available on the successful result branch. |
| variant | string? | Checked variant field of UI.Input; its exact admitted type is string?. |
| warningColor | string? | Checked warningColor field of UI.Input; its exact admitted type is string?. |
| width | (string | number)? | Checked width field of UI.Input; its exact admitted type is (string | number)?. |
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 Input = {
[number]: Node,
id: string,
accentColor: string?,
align: string?,
appearance: string?,
aspectRatio: number?,
autoComplete: string?,
backgroundColor: string?,
busy: boolean?,
className: string?,
code: string?,
columns: string?,
cornerRadius: number?,
count: number?,
dangerColor: string?,
depth: number?,
decorative: boolean?,
description: string?,
descriptionId: string?,
disabled: boolean?,
documentDescription: string?,
documentLanguage: string?,
documentTitle: string?,
enterKeyHint: string?,
endBusy: boolean?,
estimatedItemSize: number?,
errorId: string?,
external: boolean?,
fill: string?,
fit: string?,
flow: string?,
gap: string?,
header: boolean?,
height: number?,
hidden: boolean?,
href: string?,
icon: string?,
initialFocus: string?,
inputMode: string?,
inputType: string?,
itemCount: number?,
itemOffset: number?,
justify: string?,
label: string?,
language: string?,
layerState: string?,
margin: string?,
marginBottom: string?,
marginEnd: string?,
marginStart: string?,
marginTop: string?,
marginX: string?,
marginY: string?,
maxVisible: number?,
maximumLength: number?,
mode: string?,
multiline: boolean?,
motion: unknown,
mutedColor: string?,
nodeKind: string?,
onDismiss: string?,
onEndReached: string?,
onInput: string?,
onSubmit: string?,
onStartReached: string?,
onTap: string?,
open: boolean?,
orbitMotion: string?,
orbitTheme: string?,
overscan: number?,
overflow: string?,
padding: string?,
paddingBottom: string?,
paddingEnd: string?,
paddingStart: string?,
paddingTop: string?,
paddingX: string?,
paddingY: string?,
placeholder: (string | Assets.Image)?,
placeholderColor: string?,
presentation: string?,
pressed: boolean?,
priority: number?,
query: string?,
relatedTo: { string }?,
required: boolean?,
responsive: boolean?,
resultCount: number?,
ring: number?,
role: string?,
scope: string?,
scroll: string?,
selected: boolean?,
shape: string?,
signalIcon: string?,
source: (string | Assets.Image | Content.Image)?,
onError: string?,
onLoad: string?,
status: string?,
statusTone: string?,
startBusy: boolean?,
sticky: string?,
stroke: string?,
strokeWidth: number?,
successColor: string?,
surface: string?,
surfaceColor: string?,
text: string?,
textStyle: TextStyle?,
textAlign: string?,
textColor: string?,
theme: Theme?,
title: string?,
tone: string?,
totalCount: number?,
value: string?,
variant: string?,
warningColor: string?,
width: (string | number)?,
}