Design files
Every field of the [design] table of sypnia.toml, tokens.json, gallery.yaml, the screen files and the icon rules.
The files in design/ carry format: 1 (except tokens.json, which follows the W3C Design Tokens format). Unknown fields are kept and reported as warnings; your own fields start with x-. The JSON Schemas are in the engine’s repository, in spec/schemas/.
The [design] table of sypnia.toml
Design’s settings live in sypnia.toml, the one configuration file at the root of your repository that every Sypnia product shares. Design reads only its own [design] table, and the project’s id from the top-level project:
format = 1
project = "la-espiga"
[design]
guide = 4
prefix = "espiga"
components = { dir = "src/design", framework = "next" }
languages = ["es", "en"]
themes = { light = true, dark = true, switch = true }| Field | Type | What it is |
|---|---|---|
guide | integer | the current guide version |
prefix | string | the CSS variable prefix (espiga → --espiga-color-accent) |
components | table | dir (default src/design) and framework (next, vite, astro) |
languages | list | the app’s languages, first is the main one |
themes | table | light, dark, and switch (whether the app offers a switch) |
checks | table | renders (local, cloud, off), first_screen_sizes, and [[design.checks.waive]] entries (each code, path, reason, until) |
design/tokens.json
W3C Design Tokens: each token has $type and $value, optionally $description; the dark value is in $extensions["sypnia.dark"]. Required groups:
| Group | Holds |
|---|---|
color | the colour roles |
font | families and role.* (type roles) |
space, radius, border, shadow | space and shape |
motion | duration.*, easing.* (motion) |
size | touch and other fixed sizes |
layout | breakpoints and content widths |
design/gallery.yaml
| List | Fields |
|---|---|
pieces | id, component, for, not_for, variants, states, combines_with, example |
combinations | id, pieces, for, rule |
patterns | id, for, regions, pieces, phone, desktop, states_required |
design/screens/<case-id>.screen.yaml
| Field | What it is |
|---|---|
format, case, where | the format, the case id, the place id in the navigation tree |
pattern, guide | the pattern followed and the guide version used |
status, approved_by, approved_at | draft, approved or built, and the approval |
first_screen | the main content fits without scrolling |
regions | region → list of { piece, variant?, text?, repeat? } |
states | loading, empty, outcome.<name>, failure.<FailureName>, offline |
phone, desktop | how the layout changes |
design/icons/rules.yaml
| Field | Example |
|---|---|
grid, padding | 24, 2 |
stroke, cap, join | 1.75, round, round |
radii | [2.5, 9] (the arcs allowed) |
sizes | [16, 20, 24] |
signature | description and picture of the brand’s trait |