Configuration

Learn how to configure Streamdown in your project.

Streamdown can be configured to suit your needs. This guide will walk you through the available options and how to configure them.

Core Props

Prop

Type

Styling Props

Prop

Type

Plugin Props

Prop

Type

Default Rehype Plugins:

  • rehype-harden - Security hardening (allows all image and link prefixes, data images enabled)
  • rehype-raw - HTML support
  • rehype-katex - Math rendering with KaTeX

Default Remark Plugins:

  • remark-gfm - GitHub Flavored Markdown
  • remark-math - Math syntax support (single dollar text math disabled)
  • remark-cjk-friendly - CJK (Chinese, Japanese, Korean) text support
  • remark-cjk-friendly-gfm-strikethrough - CJK-friendly GFM strikethrough support

Feature-Specific Props

Prop

Type

Advanced Props

Prop

Type

The controls prop can be configured granularly:

app/page.tsx
<Streamdown
  controls={{
    table: true,        // Show table download button
    code: true,         // Show code copy button
    mermaid: {
      download: true,   // Show mermaid download button
      copy: true,       // Show mermaid copy button
      fullscreen: true  // Show mermaid fullscreen button
    }
  }}
>
  {markdown}
</Streamdown>

On this page

GitHubEdit this page on GitHub