Skip to content
All components

Components

Markdown

Markdown renders a source string with the pager's parser, so a document reads the same in the terminal and on the page. Raw HTML is shown as text, links go only to http, https and mailto, and images are never loaded; a web image becomes a link with its alt text. Fenced code is escaped in pre and code with its language class, unhighlighted, to keep the Worker small.

Prose

Headings, emphasis and lists from Markdown text.

Release notes

The grid now sorts from the address, so a link keeps its view.

  • Sort and page in the URL
  • Columns chooser
Markdown { source: "### Release notes\n\nThe grid now **sorts from the address**, so a link keeps its view.\n\n- Sort and page in the URL\n- Columns chooser\n" }

Code and tables

Fences are plain monospace; tables keep their columns.

BlockReads
gridrows
kpisone row
let html = to_html(&badge);
Markdown {
    source: "| Block | Reads |\n|---|---|\n| grid | rows |\n| kpis | one row |\n\n```rust\nlet html = to_html(&badge);\n```\n",
}

Safe by default

Raw HTML is shown as text; links go to http, https or mailto only.

A link to the docs and <b>raw HTML</b> shown as text.

Markdown {
    source: "A link to [the docs](https://www.plungeai.com/docs) and <b>raw HTML</b> shown as text.",
}

On the Mac

The same vocabulary drawn by Ocean UI's native face (egui on Metal), as the gallery's snapshot.

Markdown drawn by Ocean UI's native face, darkMarkdown drawn by Ocean UI's native face, light

Use it

Web

use ocean_ui_web::{Markdown, to_html};
to_html(&Markdown { source: "## Notes\n\nShip on **Friday**." })

Native

use ocean_ui_native::{Show, markdown_view::MarkdownView};
MarkdownView { source: "## Notes\n\nShip on **Friday**.", base_href: None }.show(ui)

Cargo feature markdown of ocean-ui-core, ocean-ui-web and ocean-ui-native; available since 2026-10-29.

In App UI, the markdown block draws it from YAML.

Props

NameTypeDefaultWhat
source&str—The Markdown text; nothing in it is trusted.

Accessibility

  • Headings, lists, tables and links keep their own elements, so the document's structure reaches assistive technology.
  • Heading levels are kept as written, so start the source at h2 under the page's h1.
  • A link to any other scheme keeps its words without an anchor, so nothing reads as a link that goes nowhere.

Related

Markdown

The same page as Markdown, for an agent or a pull request.

Search

esc

Components

Blocks

Screens built from blocks

The Ocean app

Ocean Base console