Ai textarea

AI textarea with a send button and optional attachment and voice input buttons

Contents

When buttonText is set, the submit button expands into a pill once the text reaches minCharacters (default: 6). Type at least 6 characters to see it expand.

Use minCharacters to customize the expansion threshold. Here it is set to 10.

Without buttonText the submit button stays a circle regardless of how much text is entered.

Inputs in Button text
buttonText ?: string = ''

Submit expands to a labelled pill once `minCharacters` is reached.

minCharacters ?: number = 6

Character threshold for submit expand (requires `buttonText`).

Also set in this example
control : FormControl<string>
placeholder ?: string = ''
Outputs
onAttachmentsClick ?: any = new EventEmitter<void>()
onBlur ?: any = new EventEmitter<void>()
onFocus ?: any = new EventEmitter<void>()
onInputHandled ?: any = new EventEmitter<void>()
onSkip ?: any = new EventEmitter<void>()
onSubmit ?: any = new EventEmitter<void>()
onVoiceInputClick ?: any = new EventEmitter<void>()