Ai textarea

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

Contents

By default, the textarea becomes scrollable at 12 lines on desktop and tablet, 10 lines on mobile, and 7 lines on small mobile screens.

The limits are customizable via the maxLines, maxLinesMobile and maxLinesMobileSmall inputs. This example becomes scrollable at 10 lines on desktop, 5 lines on mobile, and 3 lines on small mobile screens.

Inputs in Max lines
maxLines ?: number = 12

Scrollable line count on desktop/tablet.

maxLinesMobile ?: number = 10

Scrollable line count on mobile (>= 400px).

maxLinesMobileSmall ?: number = 7

Scrollable line count on small mobile (<400px).

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>()