> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sure-developer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Textarea

> Multi-line text input with Lua onChange payloads

# Textarea

`Textarea` renders a multi-line text input and sends a payload with `value = string` to Lua on change.

```lua theme={"dark"}
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)
```

## API

<CodeGroup>
  ```lua Builder theme={"dark"}
  ui.textarea(props)
  ```

  ```lua Declarative theme={"dark"}
  lui.textarea(props)
  ```
</CodeGroup>

## 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.                 |
