Textarea
Textarea renders a multi-line text input and sends a payload with value = string to Lua on change.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Multi-line text input with Lua onChange payloads
Textarea renders a multi-line text input and sends a payload with value = string to Lua on change.
local message, setMessage = track.state('message', 'Lua-driven UI')
lui.page('message', function(ui)
ui.textarea({
value = message,
placeholder = 'Write a message',
className = 'min-h-[96px]',
onChange = function(payload)
setMessage(payload.value)
end
})
end)
ui.textarea(props)
lui.textarea(props)
| Prop | Type | Description |
|---|---|---|
value | string | reactive getter | Current text. |
placeholder | string | Placeholder text. |
onChange | function(payload) | Receives a payload with value = string. |
textareaClassName, inputClassName | string | Textarea element classes. |
className, style | mixed | Common LUI styling props. |
Was this page helpful?
