Components

Textarea ​

Textareas collect longer freeform content while still matching the surrounding field system.

Basic Usage ​

Use a textarea when users need more room than a single-line input can comfortably provide.

Sizes ​

The textarea size scale matches the rest of the field system so longer-form inputs still align cleanly with nearby controls.

Widths ​

Textareas are full-width by default. Constrain the parent for field layouts, or set an explicit width when the textarea needs to be fixed.

Validation ​

Use validation state in the same way as other fields so error styling stays consistent across the form system.

Disabled ​

Disable the textarea when longer-form content should be visible but not editable.

Resize ​

Textareas remain vertically resizable by default so longer content can expand without changing the field type.

Character Count ​

Show a character count when text length matters but the field should remain flexible.

API ​

Slots ​

NameDescription
label—
instructions—
hintAlias for instructions

Props ​

NameDescription
customErrorCustom validation message; also settable via setCustomValidity().
Type string | null
Default null
defaultValueType string | null
Default null
disabledDisables the control and excludes it from constraint validation.
Type boolean
Default false
fitCellFlush + fill parent cell (editable tables).
Type boolean
Default false
instructionsType string
invalidType boolean
Default false
isInvalidAlias for invalid.
labelType string
maxlengthType number | undefined
nameName submitted with form data.
Type string | null
Default null
placeholderType string
readonlyType boolean
Default false
readOnlyAlias for readonly.
requiredMarks the control as required for form submission.
Type boolean
Default false
rowsNative rows — use 1 in table cells so intrinsic height doesn't overflow.
Type number | undefined
sizeType PkTextareaSize
Default default
withInstructionsType boolean
Default false
withLabelType boolean
Default false

Methods ​

NameDescription
checkValidity()Runs constraint validation without showing the browser UI.
reportValidity()Runs constraint validation and shows the browser UI when invalid.
resetValidity()Clears custom errors and re-syncs validity state.
setCustomValidity(message: string)Sets or clears a custom validation message.

Events ​

NameDescription
@blur—
@change—
@focus—
@input—

Custom States ​

NameDescriptionCSS selector
disabledThe control is disabled.:state(disabled)
invalidThe control currently fails constraint validation.:state(invalid)
optionalThe control is not required.:state(optional)
requiredThe control is required.:state(required)
user-invalidInvalid after the user has interacted with the control.:state(user-invalid)
user-validValid after the user has interacted with the control.:state(user-valid)
validThe control currently passes constraint validation.:state(valid)

CSS Parts ​

NameDescriptionCSS selector
form-controlWrapper::part(form-control)
instructionsInstructions::part(instructions)
labelLabel::part(label)
textareaNative textarea::part(textarea)
Edit this page
Last updated: Sep 9, 2026, 7:18 PM