Marketing›Testimonial

marketing

Testimonial

Customer testimonials and reviews

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: article
aliases: [review]
description: Customer testimonial or review, composed over `section`, its quote a featured quotation
attributes:
  author:       { type: string, description: "The person quoted. Without it, the `**Name** — Role` paragraph after the quote is the attribution." }
  role:         { type: string, description: "Their role or organisation, beside `author`." }
  rating:       { type: number, description: "Rating out of rating-total." }
  rating-total: { type: number, default: 5, description: "The rating's maximum." }
  variant:      { type: string, matches: [card, inline, quote], default: card, description: "Kept as `data-variant` for themes; no stylesheet branches on it." }
content:
  type: sequence
  fields:
    avatar:       { match: image, optional: true }
    quote:        { match: blockquote }
    attribution:
      match: paragraph
      optional: true
      itemModel:
        fields:
          - { name: name, match: strong }
          - { name: source, match: text, pattern: '^\s*[-–—,]\s*(.+)$', optional: true }
    avatar-after: { match: image, optional: true }
metaFields:
  rating: { rating: { total: rating-total }, condition: rating }
blocks:
  rating: { fields: [rating], layout: bar }
schema:
  type: Review
  properties: { quote: reviewBody }
  entities:
    author:
      type: Person
      property: author
      properties: { author: name, attribution.name: name, role: jobTitle, attribution.source: jobTitle }
    rating: { type: Rating, property: reviewRating, properties: { rating: ratingValue } }
defaults:
  elevation: flat
---

{% section media-position="start" media="portrait" %}
	{% slot name="avatar" /%}
	{% slot name="avatar-after" /%}

	---

	{% metablock name="rating" /%}

	{% pullquote author=$attrs.author source=$attrs.role %}
		{% slot name="quote" /%}

		{% slot name="attribution" /%}
	{% /pullquote %}
{% /section %}

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

A customer quote, with who said it and an optional star rating, published as review structured data.

Basic usage

{% testimonial %}
> The semantic approach just makes sense. We moved our entire docs site to refrakt.md in a weekend.

**Alex Rivera** — CTO, StartupCo
{% /testimonial %}
<article data-rune="testimonial" data-rune-fields="{&quot;rating-total&quot;:5,&quot;variant&quot;:&quot;card&quot;}" typeof="Review">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;start&quot;,&quot;media-position&quot;:&quot;start&quot;}" elevation="flat">
    <div data-name="content">
      <div data-name="body">
        <div data-metablock="rating" data-metablock-owner="testimonial"></div>
        <figure data-rune="pull-quote" data-rune-fields="{&quot;align&quot;:&quot;center&quot;}" data-quote="featured">
          <blockquote data-slot="quote" data-name="quote" property="reviewBody">
            <p>The semantic approach just makes sense. We moved our entire docs site to refrakt.md in a weekend.</p>
          </blockquote>
          <figcaption data-slot="attribution" data-name="attribution">
            <cite data-name="name">Alex Rivera</cite>
            <span data-name="source">CTO, StartupCo</span>
          </figcaption>
        </figure>
      </div>
    </div>
  </section>
  <span typeof="Person" property="author">
    <meta property="name" content="Alex Rivera">
    <meta property="jobTitle" content="CTO, StartupCo">
  </span>
</article>

The semantic approach just makes sense. We moved our entire docs site to refrakt.md in a weekend.

Alex RiveraCTO, StartupCo
<article typeof="Review" data-rating-total="5" data-variant="card" data-rune="testimonial" data-density="full">
  <section class="rf-section rf-section--start" data-align="start" data-media-position="start" data-elevation="flat" data-rune="section" data-density="full">
    <div data-name="content" class="rf-section__content">
      <div data-name="body" class="rf-section__body" data-section="body">
        <figure class="rf-pullquote rf-pullquote--center" data-quote="featured" data-align="center" data-elevation="flush" data-rune="pull-quote" data-density="compact">
          <blockquote data-slot="quote" data-name="quote" property="reviewBody" class="rf-pullquote__quote" data-section="body" data-reading="prose">
            <p>The semantic approach just makes sense. We moved our entire docs site to refrakt.md in a weekend.</p>
          </blockquote>
          <figcaption data-slot="attribution" data-name="attribution" class="rf-pullquote__attribution">
            <cite data-name="name" class="rf-pullquote__name">Alex Rivera</cite>
            <span data-name="source" class="rf-pullquote__source">CTO, StartupCo</span>
          </figcaption>
        </figure>
      </div>
    </div>
  </section>
  <span typeof="Person" property="author">
    <meta property="name" content="Alex Rivera" />
    <meta property="jobTitle" content="CTO, StartupCo" />
  </span>
</article>

How Markdown is read

You writeIt becomes
A blockquoteThe testimonial's text
A paragraph **Name** — Role, Company after itThe attribution: the name, with the role or organisation beneath it
An image before the quote or after the attributionThe person's portrait

The author and role attributes give the same attribution without the paragraph, for generated content or a byline you do not want in a plain-Markdown rendering. Use one form or the other: when both are written, the attribute wins.

Add a rating

Set rating for a review-style testimonial.

{% testimonial rating=5 %}
> refrakt.md completely changed how we think about content. Writing docs has never been this productive — our team ships documentation twice as fast now.

**Sarah Chen** — Head of Content, Acme Corp
{% /testimonial %}
<article data-rune="testimonial" data-rune-fields="{&quot;rating&quot;:5,&quot;rating-total&quot;:5,&quot;variant&quot;:&quot;card&quot;}" typeof="Review">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;start&quot;,&quot;media-position&quot;:&quot;start&quot;}" elevation="flat">
    <div data-name="content">
      <div data-name="body">
        <div data-metablock="rating" data-metablock-owner="testimonial"></div>
        <figure data-rune="pull-quote" data-rune-fields="{&quot;align&quot;:&quot;center&quot;}" data-quote="featured">
          <blockquote data-slot="quote" data-name="quote" property="reviewBody">
            <p>refrakt.md completely changed how we think about content. Writing docs has never been this productive — our team ships documentation twice as fast now.</p>
          </blockquote>
          <figcaption data-slot="attribution" data-name="attribution">
            <cite data-name="name">Sarah Chen</cite>
            <span data-name="source">Head of Content, Acme Corp</span>
          </figcaption>
        </figure>
      </div>
    </div>
  </section>
  <span typeof="Person" property="author">
    <meta property="name" content="Sarah Chen">
    <meta property="jobTitle" content="Head of Content, Acme Corp">
  </span>
  <span typeof="Rating" property="reviewRating">
    <meta property="ratingValue" content="5">
  </span>
</article>

refrakt.md completely changed how we think about content. Writing docs has never been this productive — our team ships documentation twice as fast now.

Sarah ChenHead of Content, Acme Corp
<article typeof="Review" data-rating="5" data-rating-total="5" data-variant="card" data-rune="testimonial" data-density="full">
  <section class="rf-section rf-section--start" data-align="start" data-media-position="start" data-elevation="flat" data-rune="section" data-density="full">
    <div data-name="content" class="rf-section__content">
      <div data-name="body" class="rf-section__body" data-section="body">
        <div data-name="rating" data-zone="rating" data-zone-layout="bar" class="rf-section__rating">
          <span data-meta-type="rating" data-field="rating">
            <span data-filled="true"></span>
            <span data-filled="true"></span>
            <span data-filled="true"></span>
            <span data-filled="true"></span>
            <span data-filled="true"></span>
          </span>
        </div>
        <figure class="rf-pullquote rf-pullquote--center" data-quote="featured" data-align="center" data-elevation="flush" data-rune="pull-quote" data-density="compact">
          <blockquote data-slot="quote" data-name="quote" property="reviewBody" class="rf-pullquote__quote" data-section="body" data-reading="prose">
            <p>refrakt.md completely changed how we think about content. Writing docs has never been this productive — our team ships documentation twice as fast now.</p>
          </blockquote>
          <figcaption data-slot="attribution" data-name="attribution" class="rf-pullquote__attribution">
            <cite data-name="name" class="rf-pullquote__name">Sarah Chen</cite>
            <span data-name="source" class="rf-pullquote__source">Head of Content, Acme Corp</span>
          </figcaption>
        </figure>
      </div>
    </div>
  </section>
  <span typeof="Person" property="author">
    <meta property="name" content="Sarah Chen" />
    <meta property="jobTitle" content="Head of Content, Acme Corp" />
  </span>
  <span typeof="Rating" property="reviewRating">
    <meta property="ratingValue" content="5" />
  </span>
</article>

Attributes

AttributeTypeRequiredDescription
authorstring—The person quoted. Without it, the `**Name** — Role` paragraph after the quote is the attribution.
rolestring—Their role or organisation, beside `author`.
ratingnumber—Rating out of rating-total.
rating-totalnumber—The rating's maximum.
variant"card" | "inline" | "quote"—Kept as `data-variant` for themes; no stylesheet branches on it.

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