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 PHP Methods (Fluent)

Method / PropertyParametersDescription
$m->textarea($id)stringCreate a textarea component.
->value($value)?stringSet the initial value.
->placeholder($text)stringSet placeholder text.
->name($name)stringForm field name.
->required($req)boolMark as required (default: true).
->maxLength($max)intSet HTML maxlength attribute.
->rows($rows)intVisible row count (default: 4).
->cols($cols)intVisible column count.
->disabled($dis)boolDisable the textarea.
->characterCount($max)intShow a character counter with the given maximum.
->resize($mode)stringResize behaviour: none, vertical, horizontal, both, auto.

JS JS Methods

Method / PropertyParametersDescription
m.textarea(id, opts)string, ?objectGet or create textarea API instance.
getValue()Returns the current text value.
setValue(value)stringSet the textarea value.
clear()Clear the textarea.
focus()Focus the textarea.
enable()Enable the textarea.
disable()Disable the textarea.

JS JS Options

Method / PropertyParametersDescription
onChangefunction(data)Called when value changes. data: {value, element}.
onInputfunction(data)Called on every input event.
onFocusfunction(event)Called when textarea gains focus.
onBlurfunction(event)Called when textarea loses focus.
autoResizeboolAuto-grow height to fit content (default: false).