05 — Component System

Component Model


Section Overview

What This Is

The Component System specifies how interface units are declared, structured, and composed. Components are named, typed, versioned specifications — not rendering implementations.

Why It Exists

Platform-specific implementations diverge without a shared specification layer. The Component System provides the conformance contract enforced by the compiler.

How It Works

Each component declares props, slots, a state machine, variants, and composition rules. The compiler validates all of these during Transform before forwarding to Emit.

Conceptual Model
Composition RulesValid nesting · cross-component constraints · compiler-enforced
↑ depends on
VariantsNamed token-binding overrides · structure unchanged
↑ depends on
State MachineDeclared states · enumerated legal transitions
↑ depends on
SlotsTyped insertion points · acyclic composition graph
↑ depends on
Component Declarationname · version · props · component-tier token bindings

All component attributes are declared explicitly. No implicit inheritance between components is permitted.

A component in IDL is a named, typed, and versioned unit of interface specification. It declares the props it accepts, the slots it exposes, the states it occupies, the variants it supports, and the component-tier tokens it consumes. A component declaration specifies the interface contract — it does not declare rendering logic, which is the responsibility of platform emitters.

Component Identity

Each component has a stable identifier, a semantic version, and a declared set of platform support annotations. The identifier is used in slot type declarations, composition rules, and cross-component references. Changing the identifier constitutes a breaking change. The version governs which changes are additive versus breaking and determines compatibility constraints between component consumers.

Component Declaration Structure

ElementRequired?Purpose
identifierYesStable name used in cross-component references.
versionYesSemantic version governing change compatibility.
propsYesTyped input declarations with defaults and constraints.
slotsConditionalRequired if the component accepts slotted content.
statesYesAll legal states and the initial state.
transitionsYesAll legal state transitions, enumerated explicitly.
variantsConditionalRequired if the component declares variant configurations.
tokensYesComponent-tier token declarations consumed by this component.
composition-rulesConditionalRequired if the component is restricted in where it may appear.