Textarea
The multi-line Input: same chrome, wrapping editor, minimum rows.
Mechanisms mirror Input — Error for danger chrome,
Disabled for read-only, the shared sizes, Field for structure.
Installation
Use the module import (the default), or own the source: lotusui add
vendors the component into your app and lotusui update keeps the copy mergeable —
see Registry.
go get github.com/ikaito-com/lotusui
# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add textarea
Usage
var msg lotusui.Textarea
msg.LayoutField(th, gtx, "Type your message here…")
Invalid — with a Field label
msg.Error = "your message is required"
msg.Layout(th, gtx, "Message", "Tell us what happened")
Disabled
msg.Disabled = true
API
| Option | Type | Description |
|---|---|---|
Size | Size | The shared size presets (Size2XS–Size2XL). |
Variant | InputVariant | InputOutline (default), InputSubtle, InputFlushed. |
Rows | int | Minimum visible lines; zero means 3. |
Error | string | Danger chrome + message. |
Disabled | bool | Read-only, dimmed. |