Answer

A component that renders an answer in Markdown format.

Basic example

1import { Answer } from '@markprompt/react';
2
3function Example() {
4  return (
5    <Answer answer="An answer in **Markdown**." state="streaming-answer" />
6  );
7}

Component API

PropTypeDescription
classNamestring

Custom class name.

answerstring

The answer to display, in Markdown format.

stateChatLoadingState

The loading state of the message.

linkAsstring | ComponentType<any>

Component to use in place of <a>. Default: "a".