Streamdown Streaming Rich Text | AIUI | Rokid

The streamdown component is used to render markdown content with streaming output support. It is especially suitable for displaying dynamic, incrementally received text, …

Streamdown Streaming Rich Text

The streamdown component is used to render markdown content with streaming output support. It is especially suitable for displaying dynamic, incrementally received text, such as replies from an AI assistant.

Usage

<streamdown 
  content="{{markdownContent}}" 
  streaming="true" 
  color="#333" 
  font-size="16"
></streamdown>

Properties

PropertyTypeDescriptionDefault
contentStringThe markdown content to render.""
streamingBooleanWhether to show a blinking cursor at the end of the text to indicate ongoing typing.false
colorStringThe primary text color of the markdown content.Inherited
font-sizeNumberThe font size of the markdown content.Inherited

Features

  • Markdown Support: Supports standard markdown syntax, including headings, lists, bold/italic text, and more.
  • Incremental Rendering: Optimized for partial content updates to achieve a "streaming" output effect.
  • Cursor Animation: A blinking cursor can be enabled to indicate an active typing/streaming state.
  • Styling: Standard CSS properties such as text color and font size can be used for styling.