Skip to main content

ContentBlock

A flexible content component that supports both Markdown and HTML rendering.

Component Preview

Props

PropTypeDescription
titlestringOptional title for the section.
subtitlestringOptional subtitle for the section.
contentUrlurlUrl of content to render (Markdown file).
format'html' | 'markdown'Format of the content. Default: 'markdown'.
imageobjectOptional image object with imageSrc, alt, and optional caption.
classNamestringOptional CSS class name for the wrapper.
invertedbooleanWhether to use inverted theme colors. Default: false.

JSON Data Example

{
"type": "ContentBlock",
"data": {
"title": "Markdown Support Example",
"subtitle": "Authoring content with Markdown",
"format": "markdown",
"image": {
"imageSrc": "https://images.unsplash.com/photo-1542831371-29b0f74f9713?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",
"alt": "Code editor",
"caption": "Writing in Markdown"
},
"contentUrl": "./Content.MD"
}
}