Overview
Choose custom elements when you want a dedicated layout node that wraps children, or directives when you already have a semantic element and want flex/box styles without an extra DOM node.
Both share the same spacing scale (numbers × 8px) and alignment keywords.
Elements vs directives
|
API
|
DOM
|
Registration
|
|---|---|---|
<x-row> / <x-col> / <x-box>
| Adds a node |
Call registerLayoutElements() once.
|
row / col / stack / box
| No extra node | Import and apply — no registration. |