RizzyUI

Markdown

The Markdown component converts GitHub‑style Markdown into HTML. It supports RzHeadings, RzParagraphs, lists, inline code, code blocks, links, images, and more. The conversion is powered by Markdig and syntax highlighting is applied via Highlight.js using the rzMarkdown Alpine.js data object.

For a full-featured markdown demo, click here.

Basic Markdown Rendering

This example demonstrates rendering simple Markdown with RzHeadings, RzParagraphs, lists, and inline styling.

Source
<RzMarkdown>
# Welcome to RizzyUI Markdown

This is an example of **bold text**, *italic text*, and `inline code`.

- List Item One
- List Item Two
- List Item Three

[Visit our website](https://rizzyui.com)
</RzMarkdown>

Markdown with Code Block

In this example, the Markdown component renders a code block with syntax highlighting for C#.

Source
<RzMarkdown>
## C# Code Example

```csharp
public class HelloWorld {
    public void SayHello() {
        Console.WriteLine("Hello, world!");
    }
}
```
</RzMarkdown>

Markdown Component Parameters

PropertyDescriptionTypeDefault
ContentRenderFragment – The Markdown content to be converted to HTML. Alternatively, you can pass a string via the Content parameter.RenderFragment?null
ComponentAssetsstring[] – Optional array of asset URLs (JavaScript/CSS) to load for syntax highlighting.string[]null
ProseWidthProseWidth – Controls the maximum width of the rendered prose content.ProseWidthProseWidth.Comfortable
PipelineMarkdownPipeline? – The Markdig pipeline used for conversion. Defaults to a pipeline with advanced extensions and custom code block rendering.MarkdownPipeline?null

Alpine API

This page uses the rzMarkdown Alpine x-data component.

MethodParametersDescription
NoneNo stable public methods are documented; initialization is automatic.