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.
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
| Element | Required? | Purpose |
|---|---|---|
| identifier | Yes | Stable name used in cross-component references. |
| version | Yes | Semantic version governing change compatibility. |
| props | Yes | Typed input declarations with defaults and constraints. |
| slots | Conditional | Required if the component accepts slotted content. |
| states | Yes | All legal states and the initial state. |
| transitions | Yes | All legal state transitions, enumerated explicitly. |
| variants | Conditional | Required if the component declares variant configurations. |
| tokens | Yes | Component-tier token declarations consumed by this component. |
| composition-rules | Conditional | Required if the component is restricted in where it may appear. |