⬡ FRAMEWERK
Core

Content

The content registry externalizes strings and sample data so a spec can be localized or repointed without touching the layout.

View as Markdown

Content: $c() and $f()

The content registry externalizes strings and sample data so a spec can be localized, or repointed at different demo data, without touching the layout.

Examples

A registry with a label and a fixture, referenced from text props:

Labels and fixtures
phone
SPEC.JSON
RENDERED OUTPUTFRAMEWERK RENDERER
Home
Espresso
Cortado
Edit the JSON to update the rendered screen.Edits stay in this preview

A screen whose visible copy all comes from the registry:

A fully externalized screen
phone
SPEC.JSON
RENDERED OUTPUTFRAMEWERK RENDERER
Welcome back
Continue
Edit the JSON to update the rendered screen.Edits stay in this preview

Anatomy

Reference entries from any text prop:

  • $c(id) — a label: one localized string. "content": "$c(nav.home)"
  • $f(id) — a fixture: arbitrary JSON for repeating or data-shaped content. A container repeats over it with "forEach": "$f(menu.items) as item", and each child reads a field with $item.name.

The split is the useful part: labels are what a translator touches, fixtures are what a demo dataset swaps. namespace groups entries by dot-notation (nav, screens.login) for organizing large registries. type is "label" or "fixture"; values maps locale → value.

Stability

The registry shape (defaultLocale, locales, entries[]) and the $c() / $f() call forms are part of the format contract. Adding an entry type is additive; changing how an existing call resolves is breaking.