Skip to content

Textarea

A standalone Angular component over a native textarea, with Form Field, accessible counter, validation, and ControlValueAccessor.

Design

Functional preview

Running with the native Angular component and HTML textarea + Angular Forms.

Loading functional preview…

Anatomy

4
1 2 3
Message must be at least 20 characters. 5
Write a clear message with enough detail. 6
1 Wrapper (.ds-textarea) -- same border/radius pattern as Input.
2 Field (.ds-textarea__field) -- the native <textarea> element.
3 Resize handle -- browser-native, vertical only by default.
4 Label (.ds-field__label) -- external, via Form Field.
5 Error message (.ds-field__error) -- external, via Form Field.
6 Helper text (.ds-field__helper) -- external, via Form Field.
Character counter (optional, .ds-field__counter) -- available via Form Field wrapper.

Default

Helper text

Sizes

SizeMin-heightUse case
Small (--sm)80pxShort inputs: feedback ratings, brief comments
Medium (--md)120pxStandard use: messages, descriptions (default)
Large (--lg)160pxLong-form content: bios, detailed feedback

Character Counter

0 / 200

States

In Figma, State only represents exclusive visual states: Default, Hover, Focus, and Disabled. Filled, Error, and Read-only are separate properties; Error combines with Default/Hover/Focus, and Read-only combines with Default/Focus.

Error

Message must be at least 20 characters. Write a clear message with enough detail.

Disabled

Readonly

Figma propertyValue / CSS triggerVisual changeToken
StateDefaultNeutral surface and bordercomponent.field.bg.default, component.field.border-color.default
StateHover / :hoverDarker bordercomponent.field.border-color.hover
StateFocus / :focus-within2px outline ring, component radiuscomponent.field.border-color.focus, component.focus-ring.*, component.textarea.focus-ring.radius.default
StateDisabled / [disabled] or .ds-textarea--disabledMuted bg, border and contentcomponent.field.bg.disabled, component.field.value.color.disabled
ErrorTrue / .ds-textarea--error or .ds-field--error .ds-textareaRed border and error focus ringcomponent.field.border-color.error, component.focus-ring.color.error
Error + StateTrue + Hover / .ds-textarea--error:hoverDarker red bordercomponent.field.border-color.error-hover
Read-onlyTrue / [readonly] or .ds-textarea--readonlyReadonly bg with neutral focus ringcomponent.field.bg.readonly, component.focus-ring.color.readonly

Figma properties

PropertyTypeDefaultDescription
Show LabelBooleantrueShows or hides the label row (including required asterisk)
LabelText"Rótulo"Label text (label/md)
RequiredBooleanfalseShows * in feedback/error/content/default next to the label
Show Helper TextBooleantrueShows or hides the helper text below the control
Helper TextText"Texto auxiliar"Caption/sm annotation (content/secondary)