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
labelReactNode

The label for the input.

labelClassNamestring

The class name of the label element.

textAreaContainerClassNamestring

The class name of the text area container.

sendButtonClassNamestring

The class name of the send button element.

buttonLabelstring

The label for the submit button.

showSubmitButtonboolean

Show an icon next to the send button.

isLoadingboolean

If the answer is loading.

IconReactNode

Icon for the button.

minRowsnumber

Minimum number of rows.

onSubmitFormEventHandler<HTMLFormElement>

Use an input field instead of a text area.

submitOnEnterboolean

Submit on enter.