Skip to content
Theme TOML Specification
AutoXXS (320px)XS (375px)SM (640px)MD (768px)LG (1024px)XL (1280px)XXL (1536px)
SketchMaterialiOSTamagui
DataInjectionKeyPatternsServiceTransactionProcessResearchProductQualityPerformanceSpecDomainFunctionTechnologyArchitectureConfigMiddlewareDataDatabaseDrizzleMigrationModelop-sqliteSchemaSQLState ManagementDraftKeystoneMergePatchPatchesPersistenceReactiveRedoStoreUndoTestingDeviceFactoryIsolationTypeScriptZodTopicsCommunicationBidsNVCDesignDesign ImplicationsEducationPedagogyFoundationsPsychologyAttachmentFloodingRelatingAuthentic RelatingUIEditorReact Native

Theme TOML Specification

Theme TOML Specification

The theme.toml file is the Anchor of Truth for StarVision. It provides explicit values that override any visual analysis.

Scope: theme.toml drives the wireframe --wf-* variable layer (the low-fidelity design-system preview). It is not a Web Awesome site theme. See docs/theme-design.guide.md for --wa-* token authoring.

Schema Definition

1. [theme]

Metadata and global behavior settings.

KeyTypeDescription
idStringUnique slug for the theme (e.g., tamagui).
labelStringHuman-readable name (e.g., Tamagui).

Note: Themes no longer declare a single mode. All themes must support both light and dark via separate CSS blocks (:root.wa-light[data-wf-theme="id"] and :root.wa-dark[data-wf-theme="id"]). Web Awesome’s wa-dark/wa-light classes, synced from Starlight, drive mode switching.

2. [brand]

Core color palette. Values map to --wf-color-* variables.

KeyVariableDefault/Typical
primary--wf-color-primary#5E6AD2
primary_text--wf-color-primary-text#FFFFFF
bg--wf-color-bg#FFFFFF
bg_light--wf-color-bg-light#F7FAFC
bg_elevated--wf-color-bg-elevated#FFFFFF
text--wf-color-text#1A202C
text_muted--wf-color-text-muted#718096
border--wf-color-border#E2E8F0
border_dark--wf-color-border-dark#CBD5E0

3. [semantic]

Status and feedback colors.

KeyVariableDefault/Typical
success--wf-color-success#38A169
warning--wf-color-warning#DD6B20
danger--wf-color-danger#E53E3E

4. [geometry]

Radii, weights, and spacing.

KeyVariableDefault/Typical
radius_card--wf-radius-card12px
radius_button--wf-radius-button8px
border_width--wf-border-width1px
spacing_gap--wf-spacing-gap1rem

5. [font]

Custom typefaces. Optional — omit to inherit the site font. When provided, StarVision emits an @import for the declared family and sets the --wf-font-* variables.

KeyVariableNotes
body--wf-font-bodyBody and label text. Include full CSS font-family string.
heading--wf-font-headingHeading elements. Defaults to body value if omitted.
mono--wf-font-monoCode and value text.

Usage Guidelines

  1. Partial Manifests: You only need to define what is known. StarVision will visual-best-fit the rest.
  2. Naming: Keys use snake_case in TOML, mapping to kebab-case CSS variables.
  3. Both Modes Required: The generated CSS file must include a light block and a dark block using the compound selector pattern — see get_instructions("starspec/fragments/wireframe/theme-selector-pattern").
  4. Font loading: If [font] keys are provided, add an @import for the font family above the variable blocks in the generated CSS.

Example

[theme]
id = "tamagui"
label = "Tamagui"
[brand]
# Light mode values
primary = "#3a9e50"
bg = "#ffffff"
text = "#000000"
[brand.dark]
# Dark mode overrides — only specify what differs
primary = "#32d74b"
bg = "#111111"
text = "#ebebeb"
[semantic]
success = "#3a9e50"
warning = "#e5a300"
danger = "#e54d2e"
[geometry]
radius_card = "10px"
radius_button = "6px"
spacing_gap = "0.75rem"
[font]
body = '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
heading = '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
mono = '"JetBrains Mono", "Fira Code", "Menlo", monospace'