Skip to content

Textarea ​

States

Loading...

A Textarea component for multi-line text input.

  • Tag: <flint-textarea>
  • Class: FlintTextarea

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintTextarea } from '@getufy/flint-ui';

Usage ​

html
<flint-textarea></flint-textarea>

Properties ​

PropertyAttributeTypeDefaultDescription
valuevaluestring''Current textarea value.
placeholderplaceholderstring''Placeholder text shown when empty.
disableddisabledbooleanfalseDisables the textarea and prevents interaction.
readonlyreadonlybooleanfalseMakes the textarea read-only.
requiredrequiredbooleanfalseMarks the textarea as required for form validation.
errorerrorbooleanfalseWhether the textarea is in an error state.
errorMessageerror-messagestring''Error message displayed below the textarea.
helperTexthelper-textstring''Help text displayed below the textarea.
labellabelstring''Label text displayed above the textarea.
sizesizeSize'md'Size variant of the textarea.
rowsrowsnumber3Number of visible text rows.
maxlengthmaxlengthnumber | undefinedundefinedMaximum number of characters allowed.
minlengthminlengthnumber | undefinedundefinedMinimum number of characters required.
patternpatternstring''Regex pattern for validation.
namenamestring''Form field name used when submitting form data.
autocompleteautocompletestring''Browser autocomplete hint.
resizeresize'none' | 'both' | 'horizontal' | 'vertical' | 'auto''vertical'Controls the resize handle.
defaultValuedefault-valuestring''Initial value for uncontrolled usage.
ariaLabelaria-labelstring | nullnullAccessible label for screen readers when no visible label is provided.

Events ​

EventDetailDescription
flint-textarea-input&#123; value: string &#125;Dispatched on every keystroke. Detail: &#123; value: string &#125;
flint-textarea-change&#123; value: string &#125;Dispatched on blur/change. Detail: &#123; value: string &#125;

CSS Parts ​

NameDescription
wrapperThe textarea's outer wrapper element.
labelThe label element.
textareaThe native textarea element.
error-textThe error message element.
help-textThe helper text element.

CSS Custom Properties ​

PropertyDefault
--flint-textarea-min-height80px
--flint-font-family—
--flint-label-color—
--flint-input-border-radius—
--flint-input-border-color—
--flint-input-bg—
--flint-text-color—
--flint-input-placeholder-color—
--flint-input-border-hover-color—
--flint-primary-color—
--flint-primary-focus-ring—
--flint-error-color—
--flint-error-focus-ring—
--flint-input-disabled-bg—
--flint-input-disabled-color—
--flint-input-readonly-bg—
--flint-help-text-color—