<baht-textarea>
Multi-line text. rows from field.rows (default 3).
Basic
Events (name)
<baht-textarea></baht-textarea>
<script>
const el = document.querySelector('baht-textarea');
el.field = {
"order": 1,
"type": "textarea",
"key": "bio",
"label": "Bio",
"placeholder": "Tell us about yourself…",
"rows": 4
};
el.value = "";
</script>| Name | Type | Default | Description |
|---|---|---|---|
fieldJS | FieldDescriptor | — | Field spec: { order, type, key, label?, placeholder?, options?, … } |
valueJS | unknown | null | Controlled value. Re-feed on every baht-input |
disabled | boolean | false | Disable the control |
readonly | boolean | false | Read-only |
required | boolean | false | Show required mark |
show-optional | boolean | false | Append the localized "(optional)" marker to the label when not required (set by <baht-form show-optional>). |
errorJS | string | null | null | Validation message to display |
debounce | number | undefined | 150 (BahtFieldBase.defaultDebounce) | Quiet time (ms) before typing reaches the host as baht-input. Blur flushes at once. 0 = every keystroke. <baht-form options.inputDebounce> sets it form-wide |
Events
Section titled “Events”| Event | detail | Description |
|---|---|---|
name | CustomEvent | |
baht-input | { key, value } | Fired on every user edit |