Textarea
Long format text inputs
Demo
API
For additional information about forms and its common elements see Form.
Tag
| Name | Description |
|---|---|
<textarea>
|
Standard HTML tag, accepts text for content |
Attributes
In addition to the attributes documented here, all standard attributes apply. See MDN <textarea> Attributes for official docs.
| Name | Value | Required | Description |
|---|---|---|---|
disabled |
Boolean attribute |
Disables the textarea, preventing user interaction. The textarea value is not submitted with the form. See readonly vs disabled guideline. |
|
readonly |
Boolean attribute |
Makes the textarea read-only, preventing user editing while still allowing the value to be submitted with the form. See readonly vs disabled guideline. |
Classes
| Name | Description |
|---|---|
success
|
Applies success styling and shows input-msg |
warning
|
Applies warn styling and shows input-msg |
error
|
Applies error styling and shows input-msg |
textarea-ai-wrapper
|
Applied to fieldset for AI-assisted textarea with icon. Requires s-icon name="ai-assisted" and textarea as children. |
Guidelines
Readonly vs Disabled
Use readonly when you want to display a value that users should see but not edit. The value will be submitted with the form.
Use disabled when you want to prevent user interaction entirely. The value will not be submitted with the form.
Important: If both readonly and disabled attributes are present, the disabled
attribute takes precedence. The textarea will appear disabled (lighter text color) and the value will NOT be submitted with the form.
Design
Design resources can be found on the Skylab design documentation site: skylab.avalara.com