Skip to content
Design System
GitHub

A model's answer in Markdown as the kit's elements, with no dependency: a safe subset (raw HTML as text, http(s) and mailto links only) that parses a growing text without flashing.

Dock check for Patrol dog 7F3A

The dock plate is clear and the charging contacts are uncovered. One cardboard box sits about 40 cm to the left of the plate, outside the docking path.

What to do

  1. Leave the box: the robot approaches from the right.
  2. If it must go, ask the night shift to move it before 22:00.
    • Log it under site/aisle-4.
    • Attach the camera frame.
CheckResultLast seen
PlateClear14:02
ContactsUncovered14:02
Box40 cm left, outside the path14:01

To watch the dock's state yourself:

bash
ros2 topic echo /dock/state --once

The camera saw the dock from about 2 m; a box behind the pillar would not show.

Details are in the docking manual (opens in a new tab).

Answer

Install
npx shadcn add @syncrobotic/markdown

Also installs: lucide-react@^1, @syncrobotic/cn, @syncrobotic/code, @syncrobotic/code-block, @syncrobotic/table

Overview

When to use

  • An assistant's answer that is already whole: a saved conversation, a summary on a robot's page.
  • A generated report or a model's explanation inside your own message layout.
  • Release notes or help text an LLM writes for operators.

Use something else

  • A streamed answer with a status, Stop and reading aloud: Streaming text with format="markdown".
  • Text written by people with formatting tools: a rich-text editor's own renderer.
  • Code alone: Code block; a path or a key in a sentence: Code.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Streaming

Safety

Images

Zh tw

Live

Usage rules

  • For text a model wrote in Markdown: an assistant's answer, a summary, a generated report. A streamed answer is StreamingText with format="markdown", which renders through this and reads it aloud; use Markdown alone for an answer that is already whole, or inside your own message layout.
  • A safe subset, never HTML: tags show as the text they are, links go only to http(s) and mailto (anything else, a relative path included, is its words), and pictures are a link with their alt text. Name the origins pictures may load from in imageOrigins, and only ones you serve or trust.
  • Pass the growing text with streaming while it arrives, and turn it off at the end: an unclosed ** styles its words, a link shows its words until its URL is whole, and a table waits for its delimiter line, so nothing half-written flashes. Keep cite and labels stable (a module constant), so finished blocks are not drawn again.
  • Headings start at headingLevel (h3, under a page's h1 and a section's h2) and never skip a level, whatever the model wrote. Set it from where the answer sits in the page.
  • Code fences are the kit's CodeBlock with Copy and the language, without highlighting; tables are the kit's Table and scroll sideways when wider than the column. Links open in a new tab by default and say so to screen readers.
  • It never speaks on its own. For citations, pass cite={citationMarker} inside Citations: [1] and [^1] in the text become markers linked to the sources list.

Changelog

  • 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
  • 0.53.02026-11-27Its doc opens with its description, word for word; the code is unchanged.
  • 0.51.02026-11-27Comments trimmed to what they need to say; the code is unchanged.

How to upgrade