🚧 MateChat React document is still under development

Markdown Rendering

Markdown components provide secure Markdown rendering including headings, code blocks, blockquotes, and links.

Installation

pnpm dlx shadcn@latest add https://matechat.noctisynth.org/r/bubble.json

Code Block

javascript
const greeting = "Hello, World!"; console.log(greeting);
import { CodeBlock } from "@matechat/react";

export default function () {
  return (
    <div className="w-full max-w-lg">
      <CodeBlock className="language-javascript">
        {`const greeting = "Hello, World!";
console.log(greeting);`}
      </CodeBlock>
    </div>
  );
}

Block Quote

This is a blockquote. It can be used to highlight important information or quotes.
import { BlockQuote } from "@matechat/react";

export default function () {
  return (
    <div className="w-full max-w-lg">
      <BlockQuote>
        This is a blockquote. It can be used to highlight important
        information or quotes.
      </BlockQuote>
    </div>
  );
}
import { Link } from "@matechat/react";

export default function () {
  return (
    <div className="w-full max-w-lg flex flex-col gap-2">
      <Link href="https://example.com">External Link (opens in new tab)</Link>
      <Link href="/path/to/page" target="_self">
        Internal Link
      </Link>
    </div>
  );
}

Properties

Heading

PropertyDescriptionTypeDefault Value

CodeBlock

PropertyDescriptionTypeDefault Value

BlockQuote

PropertyDescriptionTypeDefault Value
PropertyDescriptionTypeDefault Value