1.0.3 • Published 2 years ago

chatter-box-input v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Chatterbox

Chatterbox is a simple material formcontrol component text area that expands and indicates the number of chars entered or remaining.

Inputs

The following Inputs are available

InputTypeDefautDescription
maxLengthNUMBERINFmaximum amount of chars accepted for input
minLengthNUMBER0minimum amount of chars accepted for input
requiredBOOLEANFALSEText entry is required
labelSTRINGNULLlabel for TextArea
placeholderSTRINGNULLplaceholder text in TextArea input
counterLabelSTRINGNULLlabel for Counter
typeNUMBER11 is Total Count and -1 is Count Remaining
minRowsNUMBERNULLMin Rows (Height) for TextArea
maxRowsNUMBERNULLMax Rows (Height) for TextArea
appearenceSTRINGNULLinput style
readonlyBOOLEANfalsemakes text for disabled state black NOT 50%

FormControl

formControlName="comments"

 countrySelection = this.fb.group({
    comments: [null],
  })

Options

Here is the minimum setup required

  <wave-chatter-box
    [maxLength]="255"
    [minLength]="0"
    [label]="'Please enter your message'"
    [placeholder]="'I need some assisstance...'"
    [counterLabel]="'Total Remaining'"
    [type]="-1"
    formControlName="chatter"
  ></wave-chatter-box>

Here is the maximum setup

<div [formGroup]="form">

  <wave-chatter-box
    [maxLength]="100"
    [minLength]="10"
    [label]="'Please enter your message'"
    [placeholder]="'I need some assisstance...'"
    [counterLabel]="'Total Characters Remaining'"
    [type]="-1"
    [minRows]="15"
    [maxRows]="15"
    appearance="outline"
    required="true"
    [readOnly]="true"
    formControlName="chatter"
  ></wave-chatter-box>

</div>