Skip to main content

Textarea

Description​

<jp-textarea> is a field component with <textarea> functionality.


Attributes​

NameRequiredTypeDescription
idstringunique identifier
valuestringsetter and getter
labelstringshows at the top of a textarea field
labelType'outside' or 'inside'whether label is inside or outside of the field
hintstringadditional information that shows below textarea
disabledbooleandetermines if an input is disabled
name✓stringname of the form control
placeholderstringtemporary text that appears in a
textarea field before any input is entered
requiredbooleandetermines if a textarea is required
requiredValidationMessagestringvalidation message for when component does not satisfy required
readonlybooleandetermines if a textarea is read-only
minlengthnumberminimum character count allowed
minlengthValidationMessagestringvalidation message for when component does not satisfy minlength
maxlengthnumbermaximum character count allowed
maxlengthValidationMessagestringvalidation message for when component does not satisfy maxlength
validationMessages{[type]: string} where type is stringcompact way of writing validation messages in a single attribute


Slots​

This component does not have any slots.



Methods​

  • getValue
    • returns form field value
  • reportValidity
    • triggers reportValidity


Events​

  • value
    • triggers when value of the field changes


Demo​

Live Editor
// import '@jaspero/web-components/textarea.wc.js';
// import '@jaspero/web-components/textarea.css';

<jp-textarea label="Textarea"></jp-textarea>
Result
Loading...