Prompt

A component that renders an input prompt.

Basic example

1import { ChatView } from '@markprompt/react';
2
3function Example() {
4  return <Prompt buttonLabel="Send" showSubmitButton />;
5}

Component API

PropTypeDescription
labelReactNodeThe label for the input.
labelClassNamestringThe class name of the label element.
textAreaContainerClassNamestringThe class name of the text area container.
sendButtonClassNamestringThe class name of the send button element.
buttonLabelstringThe label for the submit button.
showSubmitButtonbooleanShow an icon next to the send button.
isLoadingbooleanIf the answer is loading.
IconReactNodeIcon for the button.
minRowsnumberMinimum number of rows.
onSubmitFormEventHandler<HTMLFormElement>Use an input field instead of a text area.
submitOnEnterbooleanSubmit on enter.