Prise en main
Introduction
What DSF is, what it is not, and the words used across this documentation.
DSF (Design System Format) describes a complete design system in plain-text .dsf files:
tokens, components, icons, usage rules and executable examples. dsfc, the reference
compiler, checks those files, runs the examples and generates native code.
Working draft. DSF is not a standard,
dsfcis not production-ready, and there is no release yet. Status and roadmap lists what works today.
What DSF describes
DSF standardizes how a design system is described, not how it looks. It ships no component catalog: a button exists because your package declares one.
- Syntax: UTF-8 HCL 2 native syntax, readable and diffable.
- Tokens: the semantics of the DTCG Format and Resolver Modules 2025.10, written natively in HCL. JSON is only an interchange format.
- Components: a typed contract, a view tree, overrides, behavior and accessibility, for any platform.
- Output: a versioned, platform-neutral intermediate representation (IR) that generators turn into SwiftUI code, Angular code and static documentation. Tokens also export to DTCG JSON.
A first look
component "Button" {
property "label" {
type = "string"
}
event "activate" {}
accessibility {
role = "button"
name = prop.label
}
view {
stack "root" {
padding = insets(token.unit.base / 2, token.unit.base)
background = token.color.action
foreground = token.color.on-action
text "label" {
value = prop.label
}
}
}
on "activation" {
emit = event.activate
}
}
Vocabulary
| Term | Meaning |
|---|---|
| Package | A directory whose manifest, design-system.dsf, holds one design_system block and lists the other source files. |
| Token | A named design value (color, dimension, typography…) with DTCG semantics, read as token.color.action. |
| Token source | A token document, token_source "<name>": the DSF form of a DTCG .tokens.json file. |
| Resolver | Builds the token tree from token sources. Sets always apply; modifiers apply one of their contexts. |
| Modifier, context | A modifier such as theme has contexts such as light and dark. Every modifier is also a context axis that components read as context.theme. |
| Component | A typed contract (properties, variants, states, slots, events), a view, overrides, behavior and accessibility. |
| View | The component’s tree of nodes: stack, text, icon, instance, slot… |
| Override | Values assigned to nodes under a condition, ordered by layer and priority. |
| State | Read-only and derived from interaction (hover, press, focus_visible), or local to the component. |
| Event | What a component emits, optionally with a typed payload. |
| Slot | A placeholder the parent fills, constrained by a cardinality and the kinds of content it accepts. |
| Example | A component instance, inputs and expectations: run by dsfc test, generated as target tests. |
Next
Build dsfc and check your first package in the Quick start.