v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

MarkdownViewer

Render a small safe Markdown subset as React nodes.

Interactive preview

Release notes

Thoughtful defaults, ordinary CSS.

  • Native controls
  • Source ownership

Read the guide

--dvy-brand: #282724;

Usage

import { MarkdownViewer } from "@devvy-ui/react";

<MarkdownViewer source={'## Release notes\n\n**Build** with ordinary CSS.'} />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
sourcestringrequiredMarkdown text.
headingLevel2–62Heading level for a single # marker.

Accessibility & behavior

Platform Behavior & Guidelines

Supports headings, paragraphs, unordered lists, fenced code, bold, italic, inline code and links. Raw HTML stays text; unsafe link schemes are removed. It is not a full CommonMark renderer.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add markdown-viewer

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

MarkdownViewer.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.