Code Examples
Code Examples
Used for rendering streaming Markdown format returned by LLMs.
Property | Description | Type | Default |
---|---|---|---|
content | Markdown content | string | - |
children | Markdown content, same as content | string | - |
components | Custom components | Record<string, React.FC<ComponentProps>> , see details | - |
paragraphTag | Custom paragraph rendering tag. Avoids errors from p tags wrapping divs in custom components. | string | p |
streaming | Streaming rendering configuration | SteamingOption , see details | - |
config | Marked.js extension | MarkedExtension | { gfm: true } |
className | Custom className | string | - |
rootClassName | Root node custom className, same as className | string | - |
style | Custom styles | CSSProperties | - |
Property | Description | Type | Default |
---|---|---|---|
hasNextChunk | Whether there is another chunk. If false, clears all cache and renders. | boolean | false |
enableAnimation | Whether to enable text animation, supports p, li, h1, h2, h3, h4 | boolean | false |
animationConfig | Text animation configuration | ControllerUpdate | { from: { opacity: 0 }, to: { opacity: 1 }, config: { tension: 170, friction: 26 } } |
Property | Description | Type | Default |
---|---|---|---|
domNode | Component Element | DomNode | - |
children | Content wrapped in component | string | - |
rest | Component properties, supports standard HTML attributes (e.g. a (link) href, title) and custom attributes | Record<string,unknown> | - |