Getting StartedComponentsDesign TokensThemingTheme SynthesizerFrameworksAccessibilityUtilitiesServer RenderingBrowser SupportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting StartedFrameworksServer RenderingDesign TokensThemingTheme SynthesizerTypographyUtilitiesAll ComponentsAccessibilityBrowser SupportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Markdown

Renders markdown content as styled HTML with zero dependencies. Supports headings, lists, code blocks, blockquotes, links, images, and inline formatting.

ComponentsMarkdown
typographystatic
<arc-markdown>

Overview

Markdown parses a markdown string into styled HTML using a small built-in parser with zero external dependencies. Pass content via the `content` attribute or as slotted text, and the component renders it with design-token styling, so headings, code blocks, blockquotes, lists, links, and inline formatting match the rest of the ARC UI theme. The parser handles the most common markdown patterns: ATX headings (`#` through `######`), bold, italic, inline code, fenced code blocks with optional language hints, ordered and unordered lists, blockquotes, links, images, horizontal rules, and paragraph separation. It is small, built for documentation, changelogs, README rendering, and component descriptions rather than full CommonMark compliance. All output is sanitized through a DOMParser pipeline that strips `<script>` elements and `on*` event handler attributes, making it safe to render user-provided markdown. The rendered HTML is injected into a styled shadow DOM container with proper spacing, typography, and color tokens applied to every element type.

Guidelines

When to use

  • Use the content attribute for dynamic markdown from APIs or state
  • Use slotted text for static markdown embedded in templates
  • Pair with CodeBlock for syntax-highlighted code when full highlighting is needed
  • Use for README rendering, changelogs, documentation, and component descriptions

When not to use

  • Do not rely on it for full CommonMark or GFM compliance. It covers common patterns only
  • Do not render untrusted HTML directly. Always go through the markdown parser
  • Do not use it for rich text editing. Pair it with a dedicated editor component instead
  • Do not nest Markdown components inside each other

Features

  • Zero-dependency markdown parser built into the component
  • Supports headings, bold, italic, code, lists, blockquotes, links, images, and HR
  • Fenced code blocks with optional language class for syntax highlighting hooks
  • Content via attribute or slotted text with automatic re-render on changes
  • XSS-safe: strips script tags and on* event handlers from rendered output
  • Full design-token styling for all rendered elements
  • Exposed "markdown" CSS part for external style customization

Preview

Usage

# Slotted Content Markdown passed as text content. " data-astro-cid-baib7xsn="true">
<arc-markdown content="# Hello World

This is **bold** and *italic* text with `inline code`.

## Lists

- Item one
- Item two
- Item three

> A blockquote with accent styling.
"></arc-markdown>

<!-- Or use slotted text -->
<arc-markdown>
  # Slotted Content

  Markdown passed as text content.
</arc-markdown>

API

contentstring''
Markdown string to parse and render. Takes precedence over slotted text content.

See Also