Skip to main content

<st-content-block>

JSON type: ContentBlock

A long-form article section: an optional eyebrow, a title, a subtitle, an optional featured image with caption, then Markdown body text. The body comes from content-src (a Markdown URL) or an inline content string (so the block works without a fetch); content-src wins when both are set.

list-style="check" shows check marks instead of bullets on the body's lists. action-label with an href adds a pill link under the body, styled by action-variant. max-width="prose" narrows the body to a 720px reading column.

The title is a real heading: <h2> by default, <h3> with heading-level="3" for a sub-section inside a larger page (smaller, lighter type, so it never outweighs a section title). Eyebrow, title, subtitle and body share one alignment: left by default, centred with text-alignment="center".

Usage​

import '@sankhyatronics/sankhya-cms/content-block'; // registers <st-content-block>

Properties​

PropertyAttributeTypeDefaultDescription
eyebroweyebrowstring''Small uppercase label above the title (e.g. "Our story").
titletitlestring''
subtitlesubtitlestring''
headingLevelheading-level2 | 322 (default) renders the title as &lt;h2&gt;; 3 as a smaller &lt;h3&gt; for a sub-section.
textAlignmenttext-alignment'left' | 'center''left'Alignment of the eyebrow, title, subtitle and body. left (default) or center.
contentSrccontent-srcstring''URL of a Markdown file.
contentcontentstring''Inline Markdown, used when content-src is not set.
imageSrcimage-srcstring''
imageAltimage-altstring''
imageCaptionimage-captionstring''
invertedinvertedbooleanfalse
listStylelist-style'default' | 'check''default'default keeps bullets; check shows a check mark on each bullet of the body's lists.
actionLabelaction-labelstring''Label of a pill link under the body. Shown only together with href.
actionLabelShortaction-label-shortstring''Shorter action-label for phones (< 480px); the full label stays the accessible name.
hrefhrefstring''Target of the pill link under the body.
actionVariantaction-variant'primary' | 'highlight' | 'light''primary'Colour of the pill link: primary (navy), highlight (cyan) or light (white).
maxWidthmax-width'none' | 'prose''none'none (default) uses the full container width; prose limits the block to a 720px column.

See the live examples in Storybook.