Content
The everyday pieces of a page. Content sits just above Dom: each call renders a small, styled
fragment, a heading, a run of text, or a container, so you describe what a page says rather than which
tags it uses. Title and Text take a value (plain or reactive);
Section and Panel take a content closure. To show a number, pass it to
Text, which stringifies it.
Contents
Functions
Functions
Content.Panel
A panel that visually groups its content in a card.
Parameters
| Name | Type | Description |
|---|---|---|
content | function | A closure describing the panel's contents. |
Example
Content.Panel(() => {
Content.Title("Summary");
Content.Text("At a glance.");
});Content.Section
Groups related content under one part of the page.
Parameters
| Name | Type | Description |
|---|---|---|
content | function | A closure describing the section's contents. |
Example
Content.Section(() => {
Content.Title("Details");
Content.Text("The finer points.");
});Content.Text
A run of text.
Parameters
| Name | Type | Description |
|---|---|---|
text | any | The text to show; plain or reactive, updating on its own when it changes. |
Example
const name = Reactive.State(Text)("world");
Content.Text(`Hello, ${name.value}!`);nameContent.Title
A heading.
Parameters
| Name | Type | Description |
|---|---|---|
text | any | The heading text; plain or reactive. |
Example
Content.Title("Welcome");