Modules · Interface

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

NameTypeDescription
contentfunctionA closure describing the panel's contents.

Example

Content.Panel(() => {
  Content.Title("Summary");
  Content.Text("At a glance.");
});
A card-like panel around a heading and text

Content.Section

Groups related content under one part of the page.

Parameters

NameTypeDescription
contentfunctionA closure describing the section's contents.

Example

Content.Section(() => {
  Content.Title("Details");
  Content.Text("The finer points.");
});
A section holding a heading and text

Content.Text

A run of text.

Parameters

NameTypeDescription
textanyThe 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}!`);
Text that tracks name

Content.Title

A heading.

Parameters

NameTypeDescription
textanyThe heading text; plain or reactive.

Example

Content.Title("Welcome");
A page heading