Skip to main content

Module components

Module components 

Source
Expand description

React-like Markdown component layer.

Authors invoke reusable UI pieces with JSX-style tags inside .md files. Components are Handlebars templates in components/*.hbs.

§Island contract (future hydration)

When a component tag includes client="load", the rendered HTML is wrapped:

<div data-orbit-island="Counter" data-props='{"initial":"0"}'>
  <!-- static fallback from Counter.hbs -->
</div>

A future /islands/loader.js can read these attributes and mount widgets.

Structs§

ComponentRegistry
Pre-compiled Handlebars templates for Markdown components.
ParsedComponent
A parsed component invocation inside Markdown source.

Functions§

expand_components
Expands JSX-style component tags in body into HTML fragments.
find_next_component
Finds the next PascalCase component tag at or after from.
is_component_name
Returns true when name is a valid PascalCase component identifier.
markdown_fragment_to_html
Compiles a Markdown fragment to an HTML string for component slots.