Components Data display
Storytelling Text
Reveal a photograph beside a word or phrase as the reader moves through a story.
I had the gallery to myself when the rain let up. At the foot of the spiral stairConcrete steps coil around a dark opening, with a pale handrail along the inner edge., a palm shadowThe shadow of a fan palm spreads across a chipped plaster wall. trembled on the plaster. I followed it as far as the colonnadeA row of stone columns casts diagonal shadows across the paving., where strips of sun fell across the stones like the rungs of a ladder.
Upstairs, a stoneware vesselA stoneware bottle with a hollow center sits on a slab in side light. held a patch of window light in its hollow middle. Someone had left a sheet of folded paperAlternating dark and bright triangles meet at a crease in folded white paper. beside it. I sketched them both. On the walk home I stopped above the tidelineNarrow ripples break a band of reflected light beneath the hazy horizon. and drew one more line across the page.
Usage
Pass your prose as Text and separate paragraphs with a blank line. Add an entry to Phrases for each word or phrase you want to illustrate. Supply its exact Text, an ImageURL, and descriptive Alt text. Set LinkURL when the phrase also leads to another page.
Register storytelling-text with Head and pass its properties to Render. Go setup guide
Write the story in Text, with a blank line between paragraphs. In Phrases, give each cue its exact Text, ImageURL, and descriptive Alt. Matching is case-sensitive and respects word boundaries. Repeated phrases share the same photograph. If two phrases start in the same place, the longer match wins.
An optional LinkURL makes a phrase a link to another page. Add NewTab: true to open the destination in a new tab. On a touch screen, TouchMode defaults to preview-first. A first tap reveals the photograph and a second tap follows a link. Choose direct-link to open a linked destination on the first tap. Keyboard users can Tab through the phrases and press Escape to dismiss a preview.
Set Effect to underline, tint, or fill. For Cursor, choose pointer, crosshair, zoom-in, or none. Set either property on a single phrase to override the story’s default. Use Class to apply a custom CSS treatment to one phrase.
Set --st-preview-width, --st-preview-ratio, --st-preview-radius, or --st-preview-rotation on the component to change the image frame. Use --st-offset for the gap from the pointer in pixels and --st-follow for tracking speed (0.05 to 1). The demo photographs are served locally. Replace their paths with image URLs from your application.
Connect a phrase to a photograph
err := mono.UI.Render(w, "storytelling-text", mono.Props{
"Title": "Notes from the coast",
"Text": "On the way home we stopped at the tideline. A narrow band of sunlight was still on the water.",
"Phrases": []mono.Props{{
"Text": "the tideline",
"ImageURL": "/components/exhibitions/quiet-forms/tideline.webp",
"Alt": "Small waves cross a band of reflected sunlight.",
"LinkURL": "/components/exhibit-gallery.html",
}},
})Go usage
err := mono.UI.Render(w, "storytelling-text", mono.Props{
"Phrases": []any{
map[string]any{
"Alt": "Concrete steps coil around a dark opening, with a pale handrail along the inner edge.",
"ImageURL": "../components/exhibitions/quiet-forms/inner-turn.webp",
"Text": "spiral stair",
},
map[string]any{
"Alt": "The shadow of a fan palm spreads across a chipped plaster wall.",
"ImageURL": "../components/exhibitions/quiet-forms/fan-light.webp",
"Text": "palm shadow",
},
map[string]any{
"Alt": "A row of stone columns casts diagonal shadows across the paving.",
"ImageURL": "../components/exhibitions/quiet-forms/long-interval.webp",
"Text": "colonnade",
},
map[string]any{
"Alt": "A stoneware bottle with a hollow center sits on a slab in side light.",
"Effect": "underline",
"ImageURL": "../components/exhibitions/quiet-forms/hollow-body.webp",
"LinkURL": "../components/exhibit-gallery.html#component",
"Text": "stoneware vessel",
},
map[string]any{
"Alt": "Alternating dark and bright triangles meet at a crease in folded white paper.",
"ImageURL": "../components/exhibitions/quiet-forms/paper-ridge.webp",
"Text": "folded paper",
},
map[string]any{
"Alt": "Narrow ripples break a band of reflected light beneath the hazy horizon.",
"ImageURL": "../components/exhibitions/quiet-forms/tideline.webp",
"Text": "tideline",
},
},
"Text": "I had the gallery to myself when the rain let up. At the foot of the spiral stair, a palm shadow trembled on the plaster. I followed it as far as the colonnade, where strips of sun fell across the stones like the rungs of a ladder.\n\nUpstairs, a stoneware vessel held a patch of window light in its hollow middle. Someone had left a sheet of folded paper beside it. I sketched them both. On the walk home I stopped above the tideline and drew one more line across the page.",
"Title": "A walk through the gallery",
"TouchMode": "preview-first",
})Rendered HTML
<section class="mu-st" id="demo-storytelling-text" data-mono="storytelling-text" aria-label="A walk through the gallery" data-st-touch="preview-first">
<div class="mu-st-copy">
<p><span class="mu-st-plain">I had the gallery to myself when the rain let up. At the foot of the </span><a class="mu-st-word" data-st-word data-st-src="../components/exhibitions/quiet-forms/inner-turn.webp" data-st-alt="Concrete steps coil around a dark opening, with a pale handrail along the inner edge." data-st-effect="underline" data-st-cursor="pointer" href="../components/exhibitions/quiet-forms/inner-turn.webp" aria-describedby="demo-storytelling-text-image-0-1">spiral stair</a><span id="demo-storytelling-text-image-0-1" hidden>Concrete steps coil around a dark opening, with a pale handrail along the inner edge.</span><span class="mu-st-plain">, a </span><a class="mu-st-word" data-st-word data-st-src="../components/exhibitions/quiet-forms/fan-light.webp" data-st-alt="The shadow of a fan palm spreads across a chipped plaster wall." data-st-effect="underline" data-st-cursor="pointer" href="../components/exhibitions/quiet-forms/fan-light.webp" aria-describedby="demo-storytelling-text-image-0-3">palm shadow</a><span id="demo-storytelling-text-image-0-3" hidden>The shadow of a fan palm spreads across a chipped plaster wall.</span><span class="mu-st-plain"> trembled on the plaster. I followed it as far as the </span><a class="mu-st-word" data-st-word data-st-src="../components/exhibitions/quiet-forms/long-interval.webp" data-st-alt="A row of stone columns casts diagonal shadows across the paving." data-st-effect="underline" data-st-cursor="pointer" href="../components/exhibitions/quiet-forms/long-interval.webp" aria-describedby="demo-storytelling-text-image-0-5">colonnade</a><span id="demo-storytelling-text-image-0-5" hidden>A row of stone columns casts diagonal shadows across the paving.</span><span class="mu-st-plain">, where strips of sun fell across the stones like the rungs of a ladder.</span></p>
<p><span class="mu-st-plain">Upstairs, a </span><a class="mu-st-word" data-st-word data-st-src="../components/exhibitions/quiet-forms/hollow-body.webp" data-st-alt="A stoneware bottle with a hollow center sits on a slab in side light." data-st-effect="underline" data-st-cursor="pointer" data-st-link href="../components/exhibit-gallery.html#component" aria-describedby="demo-storytelling-text-image-1-1">stoneware vessel</a><span id="demo-storytelling-text-image-1-1" hidden>A stoneware bottle with a hollow center sits on a slab in side light.</span><span class="mu-st-plain"> held a patch of window light in its hollow middle. Someone had left a sheet of </span><a class="mu-st-word" data-st-word data-st-src="../components/exhibitions/quiet-forms/paper-ridge.webp" data-st-alt="Alternating dark and bright triangles meet at a crease in folded white paper." data-st-effect="underline" data-st-cursor="pointer" href="../components/exhibitions/quiet-forms/paper-ridge.webp" aria-describedby="demo-storytelling-text-image-1-3">folded paper</a><span id="demo-storytelling-text-image-1-3" hidden>Alternating dark and bright triangles meet at a crease in folded white paper.</span><span class="mu-st-plain"> beside it. I sketched them both. On the walk home I stopped above the </span><a class="mu-st-word" data-st-word data-st-src="../components/exhibitions/quiet-forms/tideline.webp" data-st-alt="Narrow ripples break a band of reflected light beneath the hazy horizon." data-st-effect="underline" data-st-cursor="pointer" href="../components/exhibitions/quiet-forms/tideline.webp" aria-describedby="demo-storytelling-text-image-1-5">tideline</a><span id="demo-storytelling-text-image-1-5" hidden>Narrow ripples break a band of reflected light beneath the hazy horizon.</span><span class="mu-st-plain"> and drew one more line across the page.</span></p>
</div>
<div class="mu-st-preview" data-st-preview aria-hidden="true" hidden><img data-st-image alt="" decoding="async" draggable="false"></div>
</section>Go template
{{- $paragraphs := storyParagraphs . -}}
<section class="mu-st" id="{{.ID}}" data-mono="storytelling-text" aria-label="{{or .Title "Storytelling text"}}" data-st-touch="{{or .TouchMode "preview-first"}}">
<div class="mu-st-copy">
{{range $pi, $paragraph := $paragraphs}}
<p>{{range $si, $part := $paragraph}}{{if .ImageURL}}<a class="mu-st-word{{with .Class}} {{.}}{{end}}" data-st-word data-st-src="{{.ImageURL}}" data-st-alt="{{.Alt}}" data-st-effect="{{or .Effect $.Effect "underline"}}" data-st-cursor="{{or .Cursor $.Cursor "pointer"}}"{{if .LinkURL}} data-st-link{{end}} href="{{or .LinkURL .ImageURL}}"{{if and .LinkURL .NewTab}} target="_blank" rel="noopener noreferrer"{{end}}{{if .Alt}} aria-describedby="{{$.ID}}-image-{{$pi}}-{{$si}}"{{end}}>{{.Text}}</a>{{with .Alt}}<span id="{{$.ID}}-image-{{$pi}}-{{$si}}" hidden>{{.}}</span>{{end}}{{else if .LinkURL}}<a href="{{.LinkURL}}"{{if .NewTab}} target="_blank" rel="noopener noreferrer"{{end}}>{{.Text}}</a>{{else}}<span class="mu-st-plain">{{.Text}}</span>{{end}}{{end}}</p>
{{else}}<p>No story to display.</p>{{end}}
</div>
<div class="mu-st-preview" data-st-preview aria-hidden="true" hidden><img data-st-image alt="" decoding="async" draggable="false"></div>
</section>Component CSS
.mu-st[data-mono] {
container-type: inline-size;
display: grid;
place-items: center;
min-height: var(--st-min-height, 0);
min-width: 0;
width: 100%;
padding: clamp(2rem, 5vw, 5rem) clamp(1.25rem, 5vw, 4.5rem);
background: var(--mu-bg, #fff);
color: var(--mu-ink, #171717);
}
.mu-st-copy {
width: min(100%, 62rem);
font: 400 clamp(1.42rem, 3.8cqi, 2.375rem)/1.27 Geist, Inter, "Helvetica Neue", Arial, sans-serif;
letter-spacing: -.028em;
overflow-wrap: anywhere;
}
.mu-st .mu-st-copy p {
margin: 0;
color: inherit;
font: inherit;
letter-spacing: inherit;
text-align: start;
white-space: pre-line;
}
.mu-st .mu-st-copy p + p { margin-top: .9em; }
@container (min-width: 38rem) {
.mu-st .mu-st-copy p { text-align: justify; }
}
.mu-st-copy a { color: inherit; }
.mu-st-copy .mu-st-word {
border-radius: .08em;
color: var(--st-cue-color, inherit);
text-decoration: underline;
text-decoration-color: var(--st-rule-color, color-mix(in srgb, currentColor 55%, transparent));
text-decoration-thickness: .047em;
text-underline-offset: .12em;
text-decoration-skip-ink: auto;
box-decoration-break: clone;
-webkit-box-decoration-break: clone;
}
.mu-st-word[data-st-cursor="crosshair"] { cursor: crosshair; }
.mu-st-word[data-st-cursor="zoom-in"] { cursor: zoom-in; }
.mu-st-word[data-st-cursor="none"] { cursor: none; }
.mu-st-copy .mu-st-word:is(:focus-visible, [data-st-active]) {
color: var(--st-cue-hover-color, var(--st-cue-color, inherit));
text-decoration-color: currentColor;
text-decoration-thickness: .075em;
}
.mu-st-copy .mu-st-word[data-st-effect="tint"]:is(:focus-visible, [data-st-active]) {
background: var(--st-tint, color-mix(in srgb, currentColor 15%, transparent));
}
.mu-st-copy .mu-st-word[data-st-effect="fill"]:is(:focus-visible, [data-st-active]) {
background: var(--st-cue-color, var(--mu-ink, #171717));
color: var(--st-cue-hover-color, var(--mu-bg, #fff));
}
.mu-st[data-st-reading] :is(.mu-st-word:not([data-st-active]), .mu-st-plain) { opacity: .61; }
/* The preview can be promoted to the browser's top layer or moved into body. */
.mu-st-preview {
position: fixed;
inset: auto;
top: 0;
left: 0;
z-index: 100;
width: min(var(--st-preview-width, 17.5rem), calc(100vw - 24px));
aspect-ratio: var(--st-preview-ratio, 4 / 5);
max-height: calc(100vh - 24px);
max-height: calc(100dvh - 24px);
box-sizing: border-box;
margin: 0;
border: 0;
padding: 0;
background: transparent;
overflow: visible;
pointer-events: none;
translate: var(--st-x, 0px) var(--st-y, 0px);
}
.mu-st-preview[hidden] { display: none; }
.mu-st-preview img {
display: block;
width: 100%;
height: 100%;
border-radius: var(--st-preview-radius, 6px);
object-fit: var(--st-preview-fit, cover);
transform: rotate(var(--st-preview-rotation, 0deg)) scale(.9);
box-shadow: 0 1.3rem 2.8rem -1.1rem rgb(0 0 0 / 35%);
opacity: 0;
}
.mu-st-preview[data-open] img {
transform: rotate(var(--st-preview-rotation, 0deg)) scale(1);
opacity: var(--st-preview-opacity, 1);
}
@media (prefers-reduced-motion: no-preference) {
.mu-st-plain, .mu-st-word { transition: opacity .24s ease, background-color .22s ease, color .22s ease; }
.mu-st-preview img { transition: opacity .15s ease, transform .15s cubic-bezier(.16, 1, .3, 1); }
}
@media (prefers-reduced-motion: reduce) { .mu-st-preview img { transform: none; } }
@media (forced-colors: active) {
.mu-st[data-st-reading] :is(.mu-st-word, .mu-st-plain) { opacity: 1; }
.mu-st-copy .mu-st-word { color: LinkText; text-decoration-color: LinkText; }
}JavaScript module
const openStories = new WeakMap();
const previewVars = ['width', 'ratio', 'radius', 'rotation', 'fit', 'opacity'];
const clamp = (v, min, max) => Math.max(min, Math.min(max, v));
export function mount(root) {
const preview = root.querySelector('[data-st-preview]');
let image = preview?.querySelector('[data-st-image]');
if (!image || !root.querySelector('[data-st-word]')) return;
const doc = root.ownerDocument, win = doc.defaultView;
const motion = win.matchMedia('(prefers-reduced-motion: reduce)');
const topLayer = typeof preview.showPopover === 'function';
if (topLayer) preview.setAttribute('popover', 'manual');
const wordAt = node => node?.closest?.('[data-st-word]');
let active, mode, armed, lastPointer, listeners, hideTimer;
let gap = 18, follow = .24, width, height, insetX, insetY, target, position, frame = 0, lastFrame;
let badWord = null;
function paint() {
preview.style.setProperty('--st-x', position.x.toFixed(2) + 'px');
preview.style.setProperty('--st-y', position.y.toFixed(2) + 'px');
}
function step(now) {
frame = 0;
if (!active || !root.isConnected) { close(); return; }
const ease = motion.matches ? 1 : 1 - (1 - follow) ** (clamp(now - (lastFrame ?? now - 16), 1, 64) / 16);
lastFrame = now;
position.x += (target.x - position.x) * ease;
position.y += (target.y - position.y) * ease;
const moving = Math.abs(target.x - position.x) + Math.abs(target.y - position.y) > .5;
if (moving) frame = win.requestAnimationFrame(step);
else { position = {...target}; lastFrame = undefined; }
paint();
}
function measure() {
const w = preview.offsetWidth, h = preview.offsetHeight;
// The entrance scales the inner image. Only its rotation changes the final footprint.
const transform = win.getComputedStyle(image).transform;
const matrix = transform && transform !== 'none' && win.DOMMatrixReadOnly
? new win.DOMMatrixReadOnly(transform) : null;
const angle = matrix ? Math.atan2(matrix.b, matrix.a) : 0;
const cos = Math.abs(Math.cos(angle)), sin = Math.abs(Math.sin(angle));
width = w * cos + h * sin;
height = w * sin + h * cos;
const vp = win.visualViewport;
const scale = Math.min(1, Math.max(1, (vp?.width ?? doc.documentElement.clientWidth) - 20) / (width || 1),
Math.max(1, (vp?.height ?? win.innerHeight) - 20) / (height || 1));
preview.style.transform = scale < 1 ? 'scale(' + scale + ')' : '';
width *= scale;
height *= scale;
insetX = (width - w) / 2;
insetY = (height - h) / 2;
}
function place(x, y, snap = false) {
const vp = win.visualViewport;
const left = (vp?.offsetLeft ?? 0) + 10, top = (vp?.offsetTop ?? 0) + 10;
const right = (vp?.width ?? doc.documentElement.clientWidth) + left - 20;
const bottom = (vp?.height ?? win.innerHeight) + top - 20;
const tx = x + gap + width <= right ? x + gap : x - gap - width;
const ty = y + gap + height <= bottom ? y + gap : y - gap - height;
target = {x: clamp(tx, left, right - width) + insetX, y: clamp(ty, top, bottom - height) + insetY};
if (snap || !position || motion.matches) {
win.cancelAnimationFrame(frame);
frame = 0;
lastFrame = undefined;
position = {...target};
paint();
} else if (!frame) frame = win.requestAnimationFrame(step);
}
function anchor() {
const r = active.getBoundingClientRect();
place(r.left + r.width / 2, r.top + r.height / 2, true);
}
function onViewport(event) {
if (!active) return;
const r = active.getBoundingClientRect();
if (mode !== 'focus' || r.bottom <= 0 || r.top >= win.innerHeight) { close(); return; }
if (event.type === 'resize') measure();
anchor();
}
function close() {
if (!active) return;
active.removeAttribute('data-st-active');
root.removeAttribute('data-st-reading');
active = armed = position = lastFrame = null;
listeners.abort();
if (openStories.get(doc) === close) openStories.delete(doc);
win.cancelAnimationFrame(frame);
frame = 0;
preview.removeAttribute('data-open');
hideTimer = win.setTimeout(() => {
if (topLayer && preview.matches(':popover-open')) preview.hidePopover();
preview.hidden = true;
if (!topLayer) root.append(preview);
}, motion.matches ? 0 : 155);
}
function show(word, source, event) {
if (!word || !root.contains(word)) return;
mode = source;
if (active === word) {
if (source !== 'pointer' || motion.matches) anchor();
return;
}
openStories.get(doc)?.();
win.clearTimeout(hideTimer);
openStories.set(doc, close);
const style = win.getComputedStyle(root);
const offset = parseFloat(style.getPropertyValue('--st-offset'));
const smoothing = parseFloat(style.getPropertyValue('--st-follow'));
gap = Number.isFinite(offset) ? clamp(offset, 0, 120) : 18;
follow = Number.isFinite(smoothing) ? clamp(smoothing, .05, 1) : .24;
active = word;
word.setAttribute('data-st-active', '');
root.setAttribute('data-st-reading', '');
preview.hidden = false;
if (topLayer) preview.showPopover();
else {
for (const suffix of previewVars) {
const key = '--st-preview-' + suffix;
preview.style.setProperty(key, style.getPropertyValue(key));
}
doc.body.append(preview);
}
measure();
if (source === 'pointer' && !motion.matches) place(event.clientX, event.clientY, true);
else anchor();
listeners = new AbortController();
const {signal} = listeners;
const src = word.getAttribute('data-st-src');
if (image.getAttribute('src') !== src || (image.complete && !image.naturalWidth)) {
const next = image.cloneNode(false);
next.removeAttribute('src');
image.replaceWith(next);
image = next;
image.src = src;
}
function reveal() {
if (badWord === word) badWord = null;
preview.setAttribute('data-open', '');
}
function failed() { badWord = word; close(); }
if (!image.complete) {
image.addEventListener('load', reveal, {once: true, signal});
image.addEventListener('error', failed, {once: true, signal});
} else if (image.naturalWidth) reveal();
else { failed(); return; }
doc.addEventListener('keydown', e => { if (e.key === 'Escape') close(); }, {signal});
doc.addEventListener('pointerdown', e => { if (wordAt(e.target) !== active) close(); }, {capture: true, signal});
win.addEventListener('scroll', onViewport, {capture: true, passive: true, signal});
win.addEventListener('resize', onViewport, {signal});
win.visualViewport?.addEventListener('resize', onViewport, {signal});
win.addEventListener('blur', close, {signal});
motion.addEventListener('change', close, {signal});
}
root.addEventListener('pointerover', e => {
if (e.pointerType === 'touch') return;
const word = wordAt(e.target);
if (word && !word.contains(e.relatedTarget)) show(word, 'pointer', e);
});
root.addEventListener('pointermove', e => {
if (mode === 'pointer' && active && e.pointerType !== 'touch' && !motion.matches)
place(e.clientX, e.clientY);
});
root.addEventListener('pointerout', e => {
if (mode === 'pointer' && active && !active.contains(e.relatedTarget)) close();
});
root.addEventListener('pointerdown', e => { lastPointer = e.pointerType; });
root.addEventListener('pointercancel', () => { lastPointer = null; });
root.addEventListener('keydown', () => { lastPointer = null; });
root.addEventListener('focusin', e => {
if (lastPointer !== 'touch' && active !== wordAt(e.target)) show(wordAt(e.target), 'focus', e);
});
root.addEventListener('focusout', e => { if (mode !== 'pointer' && active === e.target) close(); });
root.addEventListener('click', e => {
const word = wordAt(e.target);
const touch = e.pointerType === 'touch' || (lastPointer === 'touch' && e.detail > 0);
lastPointer = null;
if (!word || !touch || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
if (armed === word || badWord === word ||
(root.dataset.stTouch === 'direct-link' && word.hasAttribute('data-st-link'))) {
close();
return;
}
e.preventDefault();
show(word, 'touch', e);
if (active === word) armed = word;
});
}Use the HTML in a static site
Copy the rendered HTML above. Download these assets into the same folder as your page, then add the tags below to its head.
Shared CSS Component CSS Ready-to-use module
<link rel="stylesheet" href="./base.css">
<link rel="stylesheet" href="./storytelling-text.css">
<script type="module" src="./storytelling-text.js"></script>Copy into your project
Run this command from the Mono checkout. Set -out to the component directory in your application.
go run ./cmd/mono-ui add -out ./components storytelling-textExample properties (JSON)
{
"Phrases": [
{
"Alt": "Concrete steps coil around a dark opening, with a pale handrail along the inner edge.",
"ImageURL": "../components/exhibitions/quiet-forms/inner-turn.webp",
"Text": "spiral stair"
},
{
"Alt": "The shadow of a fan palm spreads across a chipped plaster wall.",
"ImageURL": "../components/exhibitions/quiet-forms/fan-light.webp",
"Text": "palm shadow"
},
{
"Alt": "A row of stone columns casts diagonal shadows across the paving.",
"ImageURL": "../components/exhibitions/quiet-forms/long-interval.webp",
"Text": "colonnade"
},
{
"Alt": "A stoneware bottle with a hollow center sits on a slab in side light.",
"Effect": "underline",
"ImageURL": "../components/exhibitions/quiet-forms/hollow-body.webp",
"LinkURL": "../components/exhibit-gallery.html#component",
"Text": "stoneware vessel"
},
{
"Alt": "Alternating dark and bright triangles meet at a crease in folded white paper.",
"ImageURL": "../components/exhibitions/quiet-forms/paper-ridge.webp",
"Text": "folded paper"
},
{
"Alt": "Narrow ripples break a band of reflected light beneath the hazy horizon.",
"ImageURL": "../components/exhibitions/quiet-forms/tideline.webp",
"Text": "tideline"
}
],
"Text": "I had the gallery to myself when the rain let up. At the foot of the spiral stair, a palm shadow trembled on the plaster. I followed it as far as the colonnade, where strips of sun fell across the stones like the rungs of a ladder.\n\nUpstairs, a stoneware vessel held a patch of window light in its hollow middle. Someone had left a sheet of folded paper beside it. I sketched them both. On the walk home I stopped above the tideline and drew one more line across the page.",
"Title": "A walk through the gallery",
"TouchMode": "preview-first"
}