tuil
ReferenceComponentsLogs, JSON, and diffs

MarkdownViewer

MarkdownViewer component API, behavior, and executable example.

View rawEdit

Loading executable example…

API and events

Inspect streaming logs, expandable structured values, and line-oriented changes in terminal-bounded viewports.

export function MarkdownViewer({
  source,
  width = 80,
  ...props
}: MarkdownViewerProps): ReactNode;

Props, functions, and events

MemberTypeRequiredDescriptionRelated types
sourcestringYesThe source member uses the string contract.
widthnumber | undefinedNoThe width member uses the number | undefined contract.
selectableboolean | undefinedNoThe selectable member uses the boolean | undefined contract.
selectedBlocknumber | undefinedNoThe selectedBlock member uses the number | undefined contract.
idstring | undefinedNoThe id member uses the string | undefined contract.
labelstring | undefinedNoThe label member uses the string | undefined contract.
autoFocusboolean | undefinedNoThe autoFocus member uses the boolean | undefined contract.
onSelectedBlockChange((index: number) => void | Promise<void>) | undefinedNoThe onSelectedBlockChange member uses the ((index: number) => void | Promise<void>) | undefined contract.
renderBlock((node: DocumentNode, index: number) => ReactNode) | undefinedNoThe renderBlock member uses the ((node: DocumentNode, index: number) => ReactNode) | undefined contract.DocumentNode

LogViewer reports follow state; JSON expansion can be controlled; pure transformation helpers emit nothing.

Callback props run after the documented input is accepted. Callbacks are not cancellable unless their return type or description states otherwise.

Interaction and capabilities

Viewers scroll and filter; JSON nodes expand or collapse; diff output remains deterministic in static mode.

The published manifest records keyboard, focus, pointer, theme, terminal, semantic, event, and dependency requirements.

Complete import

import { MarkdownViewer } from "@/components/tuil/data-display/log-viewer";

On this page