Skip to main content

Module components

Module components 

Source
Expand description

Component registry and rendering system

Handles custom component definitions and rendering.

§Component Format

Components can be defined in two ways:

<!-- components/nav.html → <what-nav> -->
<what>
props = "active, theme"
defaults.active = "home"
defaults.theme = "light"
</what>
<nav class="navigation" data-active="#active#">
  <slot/>
</nav>

§Legacy format (with wrapper tag):

<component name="card" props="title">
  <div class="card"><h2>#title#</h2><slot/></div>
</component>

Structs§

Component
A custom component definition
ComponentRegistry
Registry of all available components