docs/components/display/Markdown

Markdown

Markdown renderer with streaming support.

import { Markdown } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#Props

PropTypeDefaultDescription
content *stringMarkdown content string to render
streamingbooleanWhether content is still streaming (shows cursor)
componentsPartial<MarkdownComponents>Custom component overrides
classstringAdditional CSS class
styleJSX.CSSPropertiesAdditional inline styles
justifybooleanApply Knuth-Plass optimal line breaking to paragraph and list-item elements. Requires text-align: justify to be set on the container for the inter-word spacing to be visible. Off by default to keep the line-breaking engine out of the bundle when unused.

* required prop.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-accent
  • --sk-bg-elevated
  • --sk-border
  • --sk-font-mono
  • --sk-radius-md
  • --sk-radius-sm
  • --sk-text-muted
  • --sk-text-primary
  • --sk-text-secondary