Marketing›CTA

marketing

CTA

Focused call-to-action blocks with headlines, descriptions, and action buttons

Composition

Install

  1. Add the package: npm install @refrakt-md/marketing
  2. Add it to the plugins array in refrakt.config.json: "plugins": ["@refrakt-md/marketing"]

About the plugin and its runes

Source

---
tag: div
aliases: [call-to-action]
description: Call-to-action section with a headline and actions, composed over `section` and `actions`
attributes:
  align: { type: string, matches: [start, center, end], default: center, description: "Alignment of the header and the actions" }
defaults:
  width: full
  elevation: flush
  prominence: display
content:
  type: sequence
  fields:
    eyebrow:  { match: paragraph, optional: true }
    headline: { match: heading, optional: true }
    blurb:    { match: paragraph, optional: true }
    body:     { match: heading|paragraph, optional: true, greedy: true }
    actions:  { match: list|fence, optional: true, greedy: true }
---

{% section align=$attrs.align %}
	{% slot name="eyebrow" /%}

	{% slot name="headline" /%}

	{% slot name="blurb" /%}

	{% slot name="body" /%}

	{% actions %}
		{% slot name="actions" /%}
	{% /actions %}
{% /section %}

View plugins/marketing/runes/cta.md on GitHub

A focused call to action: a headline, a line of copy, and the buttons or install command that act on it. It can appear anywhere on a page; for a full-width opening band at the top of one, use hero.

Basic usage

A headline with a description and action buttons.

{% cta %}
# Get Started with refrakt.md

Build structured content sites with semantic Markdown.

- [Quick Start](/docs/getting-started)
- [View on GitHub](https://github.com)
{% /cta %}
<div data-rune="cta" data-rune-fields="{&quot;align&quot;:&quot;center&quot;}">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;center&quot;}" elevation="flush" prominence="display">
    <header>
      <h1 data-slot="headline" id="get-started-with-refraktmd" data-name="headline">Get Started with refrakt.md</h1>
      <p data-slot="blurb" data-name="blurb">Build structured content sites with semantic Markdown.</p>
    </header>
    <div data-name="body">
      <div data-rune="actions">
        <ul data-slot="actions" data-name="list">
          <li data-rank="primary" data-name="action">
            <a href="/docs/getting-started">
              <span>Quick Start</span>
            </a>
          </li>
          <li data-rank="secondary" data-name="action">
            <a href="https://github.com">
              <span>View on GitHub</span>
            </a>
          </li>
        </ul>
      </div>
    </div>
  </section>
</div>

Get Started with refrakt.md

Build structured content sites with semantic Markdown.

<div data-width="full" data-rune="cta" data-density="full">
  <section class="rf-section rf-section--center" data-align="center" data-elevation="flush" data-prominence="display" data-rune="section" data-density="full">
    <header data-name="preamble" class="rf-section__preamble" data-section="preamble">
      <h1 data-slot="headline" id="get-started-with-refraktmd" data-name="headline" class="rf-section__headline" data-section="title">Get Started with refrakt.md</h1>
      <p data-slot="blurb" data-name="blurb" class="rf-section__blurb" data-section="description">Build structured content sites with semantic Markdown.</p>
    </header>
    <div data-name="body" class="rf-section__body" data-section="body">
      <div class="rf-actions" data-rune="actions" data-density="full">
        <ul data-slot="actions" data-name="list" class="rf-actions__list">
          <li data-rank="primary" data-name="action" class="rf-actions__action">
            <a href="/docs/getting-started">
              <span>Quick Start</span>
            </a>
          </li>
          <li data-rank="secondary" data-name="action" class="rf-actions__action">
            <a href="https://github.com">
              <span>View on GitHub</span>
            </a>
          </li>
        </ul>
      </div>
    </div>
  </section>
</div>

How Markdown is read

You writeIt becomes
A short paragraph, then a heading and a paragraphThe eyebrow, headline and blurb (Page sections)
More headings and paragraphsFurther copy under the blurb
A list of linksA row of buttons; the first link is the primary action
A code fenceA copyable command line beside the buttons

With command block

Code fences inside a CTA become copyable command blocks.

{% cta %}
# Install refrakt.md

Get up and running in seconds.

```shell
npm install @refrakt-md/runes
```
{% /cta %}
<div data-rune="cta" data-rune-fields="{&quot;align&quot;:&quot;center&quot;}">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;center&quot;}" elevation="flush" prominence="display">
    <header>
      <h1 data-slot="headline" id="install-refraktmd" data-name="headline">Install refrakt.md</h1>
      <p data-slot="blurb" data-name="blurb">Get up and running in seconds.</p>
    </header>
    <div data-name="body">
      <div data-rune="actions">
        <div data-name="command">
          <div class="rf-codeblock" data-slot="actions">
            <pre data-language="shell" data-slot="actions">
              <code data-language="shell" data-slot="actions">npm install @refrakt-md/runes
</code>
            </pre>
          </div>
        </div>
      </div>
    </div>
  </section>
</div>

Install refrakt.md

Get up and running in seconds.

npm install @refrakt-md/runes
<div data-width="full" data-rune="cta" data-density="full">
  <section class="rf-section rf-section--center" data-align="center" data-elevation="flush" data-prominence="display" data-rune="section" data-density="full">
    <header data-name="preamble" class="rf-section__preamble" data-section="preamble">
      <h1 data-slot="headline" id="install-refraktmd" data-name="headline" class="rf-section__headline" data-section="title">Install refrakt.md</h1>
      <p data-slot="blurb" data-name="blurb" class="rf-section__blurb" data-section="description">Get up and running in seconds.</p>
    </header>
    <div data-name="body" class="rf-section__body" data-section="body">
      <div class="rf-actions" data-rune="actions" data-density="full">
        <div data-name="command" class="rf-actions__command">
          <div class="rf-codeblock" data-slot="actions">
            <pre data-language="shell" data-slot="actions"><code data-language="shell" data-slot="actions">npm install @refrakt-md/runes
</code></pre>
          </div>
        </div>
      </div>
    </div>
  </section>
</div>

Attributes

AttributeTypeRequiredDescription
align"start" | "center" | "end"—Alignment of the header and the actions

Universal attributes

bg

The background layer: image, video, gradient, flat overlay wash and legibility scrim, in a single injected layer behind the rune's content.

AttributeTypeRequiredDescription
bgstring—Background preset applied to this block
bg-fromstring—Gradient start colour — a semantic token name (→ var(--rf-color-*))
bg-gradient"to-t" | "to-b" | "to-l" | "to-r" | "to-tr" | "to-br" | "to-bl" | "to-tl"—Gradient direction (bounded named set)
bg-gradient-type"linear" | "radial" | "conic"—Gradient type
bg-tostring—Gradient end colour — a semantic token name
bg-viastring—Optional middle gradient stop — a semantic token name
scrim"top" | "bottom" | "left" | "right" | "none"—Scrim direction (heaviest edge); presence turns the scrim on, "none" opts out of the default cover scrim
scrim-blur"none" | "sm" | "md" | "lg"—Frost scrim blur amount
scrim-strength"sm" | "md" | "lg"—Gradient scrim strength
scrim-tone"dark" | "light"—Whether the scrim darkens (for light text) or lightens (for dark text)
scrim-type"gradient" | "frost"—Scrim treatment: gradient (default) or frost (backdrop blur)
dropcap

Per-instance drop-cap opt-in.

AttributeTypeRequiredDescription
dropcapboolean—Style the opening letter of a prose body as a drop cap. Honoured only when the body reads as prose; ignored otherwise.
elevation

How far the rune sits off the page, from sunken to overlay. The theme decides what each step looks like.

AttributeTypeRequiredDescription
elevation"sunken" | "flush" | "flat" | "raised" | "floating" | "overlay" | "none" | "sm" | "md" | "lg"—Surface depth, from sunken to overlay. Deprecated: none, sm, md and lg (read as flat, raised, raised and floating)
frame

Surface chrome: a named preset from the theme registry with inline `frame-*` overrides layered on top.

AttributeTypeRequiredDescription
framestring—Named frame preset presenting this block's media surface
frame-anchorstring—Crop focal point when the guest is cut (object-position)
frame-aspectstring—Aspect ratio of the framed media, e.g. "16/9"
frame-displace"top" | "bottom" | "end" | "bottom-end" | "top-end" | "both"—Edge/corner the framed guest moves toward
frame-displace-mode"peek" | "bleed"—How displacement renders: `peek` (default) translates the guest visually inside its frame target; `bleed` uses negative margin on the media zone so following layout pulls up — extends past a section like a hero without leaving a gap above
frame-offset"none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"—Displacement distance (non-linear named scale: sm…xl ride the block-spacing tokens, 2xl/3xl/4xl step up to section-spacing for bleed-mode displacements that clear a section edge)
frame-overflow"clip" | "bleed"—How the frame handles a guest whose content is wider than it: `clip` (default) keeps it inside the rounded frame; `bleed` runs an overflowing guest out to the layout edge on a narrow viewport so it reads as cropped by the screen (a bleed host only — hero/feature)
frame-oversizestring—How far the guest exceeds its slot (scale factor)
frame-placestring—Guest-box alignment in the slot (e.g. "left top")
frame-shadow"none" | "sm" | "md" | "lg"—Silhouette drop-shadow strength for the framed media
inset

Internal padding override.

AttributeTypeRequiredDescription
inset"flush" | "tight" | "default" | "loose" | "breathe"—Inner padding of this block
motion

Scroll-reveal entrance. You choose its character; the theme decides how it moves.

AttributeTypeRequiredDescription
reveal"none" | "fade" | "slide" | "scale" | "blur"—Scroll-reveal entrance character (none|fade|slide|scale|blur); the theme owns the choreography
staggerboolean—Cascade this block's items in as it reveals (no-op on single-child runes)
prominence

Header emphasis. Scales a rune's header, or its featured quotation; the theme decides the type size for each step.

AttributeTypeRequiredDescription
prominence"quiet" | "normal" | "prominent" | "display" | "marquee"—Emphasis of a page-section header or a featured quotation (only on runes that have one)
reading

Editorial register for body text. You pick the register; the theme decides how it looks.

AttributeTypeRequiredDescription
reading"fine" | "ui" | "prose"—Reading register for this block’s body: fine | ui | prose. The theme sets how each one looks.
spacing

Block-level rhythm override.

AttributeTypeRequiredDescription
spacing"flush" | "tight" | "default" | "loose" | "breathe"—Vertical spacing above and below this block
substrate

Generated pattern fills behind the content, drawn by the theme.

AttributeTypeRequiredDescription
substrate"dots" | "grid" | "lines" | "cross" | "checker" | "none"—Generated surface pattern
substrate-fill"inherit" | "inset"—Surface fill the pattern sits on (full colour stays with tint)
substrate-opacity"sm" | "md" | "lg"—Pattern ink strength
substrate-size"sm" | "md" | "lg"—Pattern cell size
substrate-target"self" | "media"—Which surface the pattern fills (overrides the rune/theme default)
tint

Per-rune colour override: a named tint from the theme registry, with inline per-token overrides layered on top.

AttributeTypeRequiredDescription
tintstring—Color tint preset applied to this block
tint-mode"auto" | "dark" | "light"—Whether the tint adapts to auto, dark, or light mode
width

The track a block rune occupies.

AttributeTypeRequiredDescription
width"compact" | "narrow" | "content" | "wide" | "full"—Maximum width constraint for this block