TextArea
Multi-line text input with resize control, character counter, and auto-resize support.
Basic TextArea
With Character Counter
0/200
Auto-Resize
Disabled
Type in a textarea to see output...
PHP PHP Methods (Fluent)
| Method / Property | Parameters | Description |
|---|---|---|
$m->textarea($id) | string | Create a textarea component. |
->value($value) | ?string | Set the initial value. |
->placeholder($text) | string | Set placeholder text. |
->name($name) | string | Form field name. |
->required($req) | bool | Mark as required (default: true). |
->maxLength($max) | int | Set HTML maxlength attribute. |
->rows($rows) | int | Visible row count (default: 4). |
->cols($cols) | int | Visible column count. |
->disabled($dis) | bool | Disable the textarea. |
->characterCount($max) | int | Show a character counter with the given maximum. |
->resize($mode) | string | Resize behaviour: none, vertical, horizontal, both, auto. |
JS JS Methods
| Method / Property | Parameters | Description |
|---|---|---|
m.textarea(id, opts) | string, ?object | Get or create textarea API instance. |
getValue() | | Returns the current text value. |
setValue(value) | string | Set the textarea value. |
clear() | | Clear the textarea. |
focus() | | Focus the textarea. |
enable() | | Enable the textarea. |
disable() | | Disable the textarea. |
JS JS Options
| Method / Property | Parameters | Description |
|---|---|---|
onChange | function(data) | Called when value changes. data: {value, element}. |
onInput | function(data) | Called on every input event. |
onFocus | function(event) | Called when textarea gains focus. |
onBlur | function(event) | Called when textarea loses focus. |
autoResize | bool | Auto-grow height to fit content (default: false). |