ID:WORK-122Status:donePriority:mediumComplexity:moderateMilestone:v1.0.0
Document framework-native component override interface
Summary
Update the site documentation to cover the new component override interface — how component authors receive props, slots/snippets, and the tag escape hatch. This spans theme docs (writing component overrides), package docs (exporting typed interfaces), and authoring docs (the output contract).
Acceptance Criteria
site/content/docs/themes/components.mdupdated with new section on the component override interface (props, snippets, tag escape hatch)- Svelte 5 example showing a typed component override using
$props()withRecipeProps<Snippet> - Explanation of what arrives in slots (identity-transformed content with BEM classes)
- Explanation of when to use the
tagescape hatch vs props/slots site/content/docs/packages/authoring.mdupdated with guidance on exporting genericProps<R>interfaces from community packagessite/content/docs/authoring/output-contract.mdupdated to mention that properties become component props and refs become component slots- Cross-reference to
refrakt inspect --interfacefor discoverability (once WORK-121 is done) - Code examples use TypeScript with proper generic parameter usage
Approach
- Add a "Component Override Interface" section to
themes/components.mdcovering the three-part contract: props (from properties), snippets (from refs), children (anonymous content), plus the tag escape hatch - Add a recipe component walkthrough as the primary example
- Update package authoring docs with type export guidance
- Update output contract docs to connect properties/refs to the component interface
Resolution
Completed: 2026-04-04
Branch: claude/adr-008-implementation-nBN9K
What was done
- Added "Component Override Interface" section to
site/content/docs/themes/components.mdwith table, Svelte 5 recipe example, and key points about identity-transformed content, nested refs, and escape hatch - Added "Exporting typed component interfaces" section to
site/content/docs/packages/authoring.mdwith GameItem example showing BaseComponentProps usage - Added "Component override mapping" subsection to
site/content/docs/authoring/output-contract.mdwith properties→props, refs→slots mapping table - All code examples use TypeScript with proper generic parameter usage
- Cross-references to
refrakt inspect --interfaceincluded
Notes
- Documentation follows existing style and structure of each file
- Recipe component used as primary example since it has rich properties and refs