AIComponentBeta

Response.

Markdown that reads well mid-sentence.

Renders a model's GitHub-flavored markdown with Dixy typography, code blocks, links and tables. While text is still arriving, unfinished fences and bold are closed for display, so half a reply never turns into a wall of code or stray asterisks.

react-markdown + remark-gfmKeyboard consideredView source

Make it yours

Preparing the example…

PROPERTIES1

Composition

Anatomy

Markdown is split into blocks at blank lines; finished blocks are memoized, so each new token re-parses only the last one. Install the optional peers react-markdown and remark-gfm.

Component structure
Response (streaming, headingOffset, components)
├── block — memoized, parsed once
├── block — memoized, parsed once
└── last block — repaired with completeMarkdown while streaming
    ├── h3 (from #), p, ul, Blockquote, Code
    ├── CodeBlock (from ``` fences)
    └── Table (from pipes), scrollable region

A place to start

Usage

Import the stylesheet once at your application root. This complete example reflects the properties selected above.

Loading example…

Details that make a difference

Examples & states

The finer details

API reference

Generated from Dixy’s local TypeScript interfaces. Native HTML attributes and refs are forwarded. The table covers Dixy’s own options.

Response

PropType / descriptionDefault
children*string

Markdown from the model, GitHub flavored: tables, task lists, strikethrough and autolinks. Raw HTML is shown as text, never rendered.

—
streamingboolean

The text is still arriving. Unfinished fences, code and bold are closed for display, and the region reports itself busy.

false
headingOffsetnumber

Levels added to markdown headings so a reply's "# Title" sits below the page's own headings.

2 (h1 renders as h3)
componentsComponents

Replace how individual elements render; merged over Dixy's mapping.

—
remarkPluginsOptions["remarkPlugins"]

Extra remark plugins, run after remark-gfm.

—
placeholderReactNode

Shown while streaming has started but no text has arrived.

—

Built from the same foundations

Styling tokens

Change Theme settings above to compare appearance, accent, neutral, radius, spacing density, motion and direction. Override component aliases on a Theme root so custom properties follow portaled content too. The wrapper merges className, style, refs and render composition with its owning primitive.

TokenPurpose
--dixy-font-body-mdThe component-specific starting point.
--dixy-font-label-mdControl label font and line height; body roles remain readable in text inputs.
--dixy-color-background-selectedSelected surfaces use semantic color across appearances.
--dixy-color-border-focusFocus indication remains visible independently of shadows.
--dixy-spacing-inset-smDensity-aware component padding.
--dixy-motion-transition-feedbackShort state feedback, reduced by the inherited motion setting.
Explore theme customization

Consider everyone

Accessibility

Headings shift down two levels by default, so a reply's # Title does not compete with the page's own h1. External links open in a new tab with rel=noopener. Raw HTML in a reply is shown as text, never rendered. A streaming response sets aria-busy.

TabReach links, copy buttons, and scrollable code and tables.
Arrow keysScroll a focused code block or table sideways.

Target: WCAG 2.2 AA. Automated tests cover selected behavior; manual screen-reader, contrast, and zoom validation remain part of the release checklist.

THE THINKING BEHIND IT

Build it. Then understand it.

A partial reply is invalid markdown most of the time. Repairing only the tail (close the fence, pair the **, drop a half-arrived link) keeps every frame readable without changing the final text.

A token to follow--dixy-font-body-md

Nothing up our sleeves

Source
UP NEXTCode Block