js/ui/components/html

js/ui/components/html.ts

fino:ui/components/html — HTML target for the host-neutral component catalog.

toHtml() resolves components and primitives into ordinary HTML VNodes. htmlPage() wraps serialized markup in a document shell and combines the base palette with CSS fragments registered beside component families.

import { Box, Text } from 'fino:ui/components';
import { htmlPage, toHtml } from 'fino:ui/components/html';
import { renderToHtml } from 'fino:ui/html';

const body = renderToHtml(toHtml(Box({ children: Text({ children: 'ready' }) })));
console.log(htmlPage(body));

Functions

function toHtml(node: VNode, options: ToHtmlOptions = {}): VNode

Transform a component tree into ordinary HTML VNodes.

function pageCss(): string

Aggregate base CSS with fragments registered by loaded component families.

function htmlPage(body: string, options: { title?: string } = {}): string

Wrap serialized component markup in a complete HTML document.

Constants

const PAGE_CSS

Base palette and primitive styles included in every generated page.