Ai input

AI input with a single-line field, a submit button, and an optional skip text button.

Contents

Set isSubmitDisabled to disable the submit button while the rest of the input stays usable.

Set isSkipDisabled for the other way round, so a question that must be answered can still take an answer.

Set isDisabled to lock the whole field, typing included.

Inputs in Disabled
isDisabled ?: boolean = false

When true, disables the whole field: typing, submit and skip. Takes precedence over `isSubmitDisabled` and `isSkipDisabled`. Unlike `control.disable()`, the control's value and validity are left alone.

isSkipDisabled ?: boolean = false

When true, disables only the skip button. The input stays interactive.

isSubmitDisabled ?: boolean = false

When true, disables only the submit button. The input stays interactive.

Also set in this example
control : FormControl<string>
placeholder ?: string = ''
showSkipBesideSubmit ?: boolean = false

Renders Skip beside the submit button instead of replacing it.

skipLabel ?: string

When set, shows a Skip text button in place of the submit button while the field is empty.

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