ns-xml-custom-components
Installation
SKILL.md
XML builder: custom components, platform blocks, and its errors
Custom components
Point an xmlns prefix at a module path (relative to app/), then use exported view classes as tags:
<Page xmlns:ui="components/rating">
<StackLayout>
<ui:Rating value="3" />
</StackLayout>
</Page>
- The module's exported symbol name is the tag (
export class Rating extends GridLayout). - A component folder can be XML-first:
components/card/Card.xml(+ optional co-locatedCard.css, code-behind, or apackage.jsonnaming the entry) — usable with no JS class at all. - Framework modules work through the same mechanism:
xmlns:c="ui/label"→<c:Label>. - Unknown attributes on a custom component become plain expando properties (
panel['myProperty'] = 'myValue') — never an error, so attribute typos fail silently. Property names are checked nowhere; test bindings visually. - Dashed lowercase tags are first-class:
<stack-layout>,<segmented-bar>— and CSS type selectors must use that dashed form.