Skip to main content

Component, props, Slot, and Fill

Compose registered primitives and XML definitions behind explicit inputs and outputs.

Quick reference​

SyntaxBehavior
Component name="Panel" props="title, open=false"One rendered root; required props precede optional constant defaults by convention.
SlotDefault content outlet with optional fallback children.
Slot name="footer"Named content outlet.
Fill slot="footer"Caller content for that outlet.

Example​

<UI>
<Component name="Panel" props="title">
<Column><Text bind-text="props.title" /><Slot /><Slot name="footer" /></Column>
</Component>
<Panel title="Details">
<Text text="Body" />
<Fill slot="footer"><Text text="Footer" /></Fill>
</Panel>
</UI>

Rules and validation​

Definitions cannot nest. Required omissions and unknown props fail. Defaults are constant expressions, not type declarations. Definitions read explicit props and do not capture root data. Slot content retains caller scope. Duplicate outlets/fills, undeclared slot names, or both default children and an explicit default Fill are errors. Events are explicitly emitted; caller fill events belong to the caller boundary.

Reuse a component · Composition lesson · Library index