Forms Form-associated
Textarea <pm-textarea>
Multi-line text input that grows with content (between rows and max-rows). show-count adds a live character counter (announced politely near the limit). Ctrl/⌘+Enter submits the form.
Sizes
Set with the size attribute; controls keep touch-sized targets on phones.
size="xs"size="sm"size="md"size="lg"size="xl"States
Each state is one attribute.
DisabledRead-onlyRequiredErrorWith a hintAttributes
| Attribute | Type | Default | Description |
|---|---|---|---|
placeholder | string | — | Hint text shown while empty (not a replacement for label). |
rows | number | — | Visible lines before it starts to grow. |
maxlength | number | — | Maximum number of characters. |
max-rowsprop: maxRows | number | — | Stop growing after this many lines (then scroll). |
show-countprop: showCount | boolean | false | Show "n / max" under the field. |
autocomplete | string | — | Browser autofill hint (the HTML autocomplete token). |
name | string | — | Form field name: the value is submitted under it. |
value | string | — | Current value (submitted with the form). |
label | string | — | Visible label (required for accessibility; use hide-label to visually hide it). |
hint | string | — | Help text under the field, linked to it for screen readers. |
error | string | — | Custom error message. Setting it marks the control invalid. |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | — | Control size. |
required | boolean | false | The form cannot be submitted until this has a value. |
disabled | boolean | false | Not interactive and not submitted. |
readonly | boolean | false | Focusable and submitted, but not editable. |
hide-labelprop: hideLabel | boolean | false | Hide the label visually; it stays the accessible name. |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.
Events
| Event | React / Svelte prop | Description |
|---|---|---|
pm-input | onPmInput | On every value change while editing. |
pm-change | onPmChange | When the value is committed. |
Methods
checkValidity(), reportValidity(), validate(), focus()
Used in templates
Customer 360InboxProject boardTeam and rolesUser profileAccount settingsProduct pageContactAppointment bookingFeedback survey