RouteCachecomponent
Keep-alive page cache keyed by the current URL — drop it into a layout around its scrolling content region.
RouteCache({ maxCached = 10, children }: RouteCacheProps): ReactNodeA React component library for building Shelving apps — forms, content, layout, routing, dialogs, and the documentation-site components, all in one place.
The ui module exists so an app never hand-rolls the same form field, card, or router twice. Every component picks up its look from shared CSS and exposes its variations as props. You build a screen by composing these pieces, and reach for a custom-styled element only when nothing here fits.
ui is consumed as source — it ships .tsx and .module.css files and needs a bundler that understands CSS Modules and JSX. It is not part of the root shelving package; import it from shelving/ui.
A few conventions run through every component:
color="red", size="large", space="none", width="narrow") and boolean props for on/off variants (<Button strong>, <Title center>, <Flex wrap>). Each maps to a class in a CSS Module. Reach for them when a component needs to look different in one place — the way the docs site tints its accents purple — not as the way to dress a whole app. You never pass style or raw className.*Page, a *Card — take their identity from library components like <Card>, <Section>, <Button>, and <Tag> rather than shipping their own styling.theme.css that overrides the base design-token variables (and, where needed, per-component hooks) at :root, and import it after the library styles. The recommended workflow is to spend time tuning those variables to match your design — see Theming below.The styling system lives in style/ and has four moving parts: design tokens, the tint scale, cascade layers, and the styling props. Components compose them in a predictable shape; consumers theme by overriding CSS custom properties at :root.
Design tokens. Every design-token constant is defined at :root, split across the themed token modules in style/ — each module owns one domain, documents the variables it defines, and is the page a theme author overrides. style/layers.css is the cascade-layer anchor; every *.module.css @imports it plus the specific token modules it references, so the tokens and the layer order reach every component regardless of bundle order. The domains are: colours (getColorClass()), typography — font size, weight, family, and case (getTypographyClass()), spacing (getSpaceClass()), widths (getWidthClass()), radii (getRadiusClass()), strokes (getStrokeClass()), shadows (getShadowClass()), and durations (getDurationClass()). Each also defines the semantic aliases a theme usually targets (--color-primary, --color-link, --space-paragraph, …). Components read tokens via var(--token).
The tint scale. All colour flows from one anchor variable, --tint-50, from which a 21-step ladder is computed and recomputed under TINT_CLASS — the heart of how color= and status= retint a whole subtree. The ladder, the recompute trick, the painting conventions, and the theming guide all live on the TINT_CLASS page.
Cascade layers. Styles are ordered by @layer, lowest to highest priority: defaults (:root tokens, the tint ladder, body baseline) → components (the bulk of the CSS: .card, .button, …) → variants (cross-cutting opt-in modifiers, which always beat components) → overrides (top-priority structural fixes like :first-child / :last-child margin collapses). Unlayered rules beat all layered rules, so a theme should set tokens at :root or wrap its rules in @layer.
Styling props. The cross-cutting visual options are props, each backed by a helper in style/ that maps the prop to a class. Colour and status move the tint anchor — getColorClass() and getStatusClass(); font size, weight, family, and case, plus text alignment, tint, and wrapping, all come from getTypographyClass(), which extends ColorVariants and composes getColorClass() so every typographic element also accepts color (use getColorClass() directly only for colour-without-typography, e.g. <Icon>); spacing, block-padding, inline-padding ("indent"), and gap from getSpaceClass(), getPaddingClass(), getIndentClass(), and getGapClass(); width constraints from getWidthClass(); flex layout from getFlexClass(); and opt-in scrolling from getScrollClass(). Each helper's page lists its exact prop values and what they set. A component opts into the props it wants by extending the matching *Props interfaces and composing the getXxxClass(props) calls.
Each painting component also exposes per-property theme hooks (--card-background, --card-radius, …) for surgical overrides. To recolour a component or a whole region, apply color= / status= — on it or an ancestor scope — rather than a per-component tint hook; components no longer set the tint anchor themselves. Those hooks are documented in each component's own Styling section (see <Card> for the precedent).
The recommended way to give an app its own look is a theme stylesheet, not styling props. Create a theme.css, override the base design-token variables at :root, and import it after the library styles:
/* theme.css — imported after shelving/ui styles */
:root {
--color-primary: oklch(58% 0.25 300); /* purple brand */
--font-body: "Inter", system-ui;
--radius-normal: 0.5rem; /* tighter corners everywhere */
--space-normal: 1.125rem; /* roomier spacing scale */
}Each base token lives in a themed module that documents the variables it defines and which ones a theme usually overrides. Work from broadest (a palette colour or scale root) to narrowest (a single semantic alias):
weight · size · font — typography (--weight-*, --size-*, --font-*, --case-label).color — palette, semantic, and brand colours (--color-*).space · width — layout spacing and widths (--space-*, --width-*).radius · stroke · shadow · duration — surface tokens (--radius-*, --stroke-*, --shadow-*, --duration-*).The tint ladder is the one exception that doesn't follow the override-a-variable pattern: its 21 steps are recomputed from a single anchor inside every tinted scope, so you move the anchor (via color= / status=) rather than overriding individual steps. See TINT_CLASS for the full theming guide, and each component's Styling section for its per-property hooks.
The components below are listed in the index following this page; this is the short version of where to start reading.
Content. Block-level structure starts with <Card>, <Section>, and the <Heading> / <Title> family, with <Table>, <List>, and <Figure> for specific shapes; wrap longform copy in <Prose>. Inline pieces — <Link>, <Code>, <Strong>, <Mark> — live inside that block content. To render a Markdown string as components, use <Markup>.
Structure. Mount a client app with <App>, or render a full server document with <HTML> and <Page>. Arrange the screen with <CenteredLayout> or <SidebarLayout>, and drive URLs with <Navigation> and <Router>.
Interaction. Forms start at <Form>, which wires <Field> and the typed inputs to a FormStore; <Button> is the standalone action. Overlays are <Dialog> and <Modal>; navigation menus are <Menu> and <MenuItem>; transient feedback is <Notice> (and the global <Notices> list); animate enter/leave with <Transition>.
Documentation site. Hand an extracted tree to <TreeApp> and you get a complete site — sidebar, routing, and a rendered page per element — using the renderers in docs/.
Keep-alive page cache keyed by the current URL — drop it into a layout around its scrolling content region.
RouteCache({ maxCached = 10, children }: RouteCacheProps): ReactNodeTop-level navigation provider.
Navigation({ children, ...meta }: NavigationProps): ReactElementMatch the current URL against routes and render the matched element.
Router({ routes, fallback, ...meta }: RouterProps): ReactElement | nullStyled <aside> overlay container for modal content.
Modal({ children }: ModalProps): ReactElementModal <dialog> element that opens on mount and includes a close button.
Button that closes its wrapping <dialog>, showing an X icon by default.
DialogCloseButton({ children = <XMarkIcon />, ...variants }: DialogCloseButtonProps): ReactElementProvider that creates a fresh DialogsStore and shares it with its subtree.
DialogsContext({ children }: DialogsContextProps): ReactElementRender the open dialogs from the current DialogsContext.
Dialogs(): ReactNode | null
Show the current form's "main" (unnamed) message as a <Notice>, or render nothing when there is no message.
FormNotice(props: Omit<NoticeProps, "children">): ReactElement | null
Show a SchemaInput for a single named property of the current form.
FormInput({ name, ...props }: FormInputProps): ReactElementShow a SchemaInput for every property in the current form's schema.
FormInputs(): ReactElement
Show the current form's "main" (unnamed) message as a <Message>, or render nothing when there is no message.
FormMessage(props: BlockVariants): ReactElement | null
Show progress as a single continuous horizontal bar, filled to value within the min–max range (matches getPercent() and formatPercent()).
Progress({ value, min = 0, max = 100, ...props }: ProgressProps): ReactElementShow a <Field> (label, input, and message) for a single named property of the current form.
FormField({ name, ...props }: InputProps): ReactElementShow a <Field> for every property in the current form's schema.
FormFields(): ReactElement
Schema-driven form that creates a FormStore, provides it via FormContext, and validates/submits on submit.
Form(props: FormProps<T>): ReactElement
A <Field> wraps around a form control/input, to shows a small <label> above it.
Field({ title, description, message, children, ...props }: FieldProps): ReactElementShow a form footer with a submit button and the form's error message.
FormFooter({ children, submit }: FormFooterProps): ReactElementBlock-level status callout with an icon and message, used to highlight feedback.
Notice({
children, //
icon,
...props
}: NoticeProps): voidRender the global list of notices and subscribe to incoming "notice" events.
Notices(props: NoticesProps): ReactElement
Wrap a single page (or screen) within an app, applying its meta and head tags.
Page({ children, ...meta }: PageProps): ReactElementRender the full <html> document shell wrapping <head> and <body>.
HTML({ children, ...meta }: HTMLProps): ReactElementEmit the current page's head metadata and sync browser history to its URL.
Head(): ReactElement
Button to toggle the surrounding <figure> element or <body> element in/out of fullscreen mode.
FullscreenButton({ target = "body, figure", ...props }): ReactElement | nullButton that retries the nearest <Catcher> error boundary when clicked.
RetryButton({ children = _RETRY_CHILDREN, ...props }: RetryButtonProps): ReactElement | nullRender either a <button>, an <a href="">, or a plain <span> based on whether an onClick or href prop is provided.
Clickable(props: StylableClickableProps): ReactElement
Render either a <button> or an <a href=""> styled as a button, based on whether an onClick or href prop is provided.
Button(props: ButtonProps): ReactElement
Table cell.
Cell({ header = false, children, ...props }: CellProps): ReactElementTable block — rendered as <table>.
Table({ children, ...props }: TableProps): ReactElementTransition that slides its children vertically — down when moving forward, up when moving back.
VerticalTransition(props: VerticalTransitionProps): ReactElement
Transition that collapses its children in and out by animating their size.
CollapseTransition(props: CollapseTransitionProps): ReactElement
Transition that slides its children horizontally — right when moving forward, left when moving back.
HorizontalTransition(props: HorizontalTransitionProps): ReactElement
Transition that fades its children in and out by animating their opacity.
FadeTransition(props: FadeTransitionProps): ReactElement
Wrap children in a React View Transition, applying the configured transition classes.
Transition({ children, default: d, forward = d, back = d, overlay = false }: TransitionProps): ReactElementImage block — renders an <img> with space and width variants applied.
Image({ src, alt, ...props }: ImageProps): ReactElementFlex container that arranges its children as a row by default.
Row({ as: Element = "div", children, ...props }: RowProps): ReactElementLabel heading, a <h3> with a labelly appearance (UPPERCASE but with a smaller text size).
Label({ level = "3", children, ...props }: LabelProps): ReactElementSection heading — renders an <h2>.
Heading({ level = "2", children, ...props }: HeadingProps): ReactElementPlain <div> block with block-level spacing.
Block({ as: Element = "div", children, ...props }: BlockProps): ReactElementCards are boxed areas for content to sit within.
Card({ as: Element = "article", children, href, onClick, title = "Open", ...props }: CardProps): ReactElementFull-width vertical region that paints the current surface colour. Use to break a page into stacked sections. Has zero block-space (Panels butt against each other); set its vertical breathing room with the padding variant (<Panel padding="large">, <Panel padding="xxlarge"> etc.).
Panel({ as: Element = "section", children, ...props }: PanelProps): ReactElementDescription list — a sequence of term/value pairs rendered as a <dl>.
Definitions({ children, ...props }: DefinitionsProps): ReactElementPage title — renders an <h1>.
Title({ level = "1", children, ...props }: TitleProps): ReactElementFlex container that stacks its children as a column by default.
Column({ as: Element = "div", children, column = true, ...props }: ColumnProps): ReactElementQuoted block of text — rendered as <blockquote>.
Blockquote({ children, ...props }: BlockquoteProps): ReactElement<section> block with section-level spacing.
Section({ as: Element = "section", children, ...variants }: SectionProps): ReactElement<header> block with section-level spacing.
Header({ as: Element = "section", children, ...variants }: SectionProps): ReactElement<footer> block with section-level spacing.
Footer({ as: Element = "section", children, ...variants }: SectionProps): ReactElement<article> block with section-level spacing.
Article({ as: Element = "article", children, ...variants }: SectionProps): ReactElement<figure> block with section-level spacing.
Figure({ as: Element = "figure", children, ...variants }: SectionProps): ReactElementShow an optional AddressData object correctly on screen.
PhysicalAddress({ name, address }: PhysicalAddressProps): ReactElementShow an optional email address string correctly on screen.
EmailAddress({ name, email }: EmailAddressProps): ReactElementA single collapsible panel within an Details, built on native <details> and <summary>
Details({ title, open = false, name, children, ...props }: DetailsProps): ReactElementList block — wraps each child in an <li> and renders an <ul> or <ol>.
List({ children, ordered = false, ...props }: ListProps): ReactElement<figcaption> block — caption text for a <Figure>.
Caption({ children, ...props }: CaptionProps): ReactElementPreformatted block of text — rendered as <pre>.
Preformatted({ children, ...variants }: PreformattedProps): ReactElementVideo container element.
Video({ children, ...props }: VideoProps): ReactElementA section of longform text containing lots of <p> or <ul> style elements.
Prose({ children }: ProseProps): ReactElementParagraph block of body text — rendered as <p>.
Paragraph({ children, ...props }: ParagraphProps): ReactElementSubsection heading — renders an <h3>.
Subheading({ level = "3", children, ...props }: SubheadingProps): ReactElementWrap children in a scrollable container with horizontal and/or vertical scrolling enabled.
Scroll({ children, ...props }: ScrollComponentProps): ReactElementLayout with a fixed-width side column (typically navigation) next to a scrollable main content column.
SidebarLayout({ sidebar, children, right = false }: SidebarLayoutProps): ReactElementLayout that centres its content with no header/footer and a narrow max-width.
CenteredLayout({ children, ...props }: CenteredLayoutProps): ReactElementSmall button linking to a specific tree element, resolved by reference string.
TreeButton({ name, children, small = true, plain = true, ...variants }: TreeButtonProps): ReactElementInline Code token linking to a specific tree element, resolved by reference string — the link-styled counterpart of TreeButton.
TreeLink({ name, children, ...props }: TreeLinkProps): ReactElementRender a markup string with inline code spans auto-linked to their documented tree elements.
TreeMarkup({ rules = TREE_MARKUP_RULES, ...props }: MarkupProps): ReactNodeCard renderer for a generic tree-element (a directory or file) — a summary card showing the heading and description.
TreeCard({ path, name, title, description }: TreeElementProps): ReactNodeResolve a URL path to a tree element and render it as a full page.
TreeRouter({ fallback, ...meta }: TreeRouterProps): ReactNodeBreadcrumb trail of links to a tree page's ancestors, separated by › arrow icons.
TreeBreadcrumbs({ tint = "70", left = true, wrap = true, ...props }: TreeBreadcrumbsProps): ReactElement | nullPage renderer for a generic tree-element (a directory or file).
TreePage({ title, name, description, content, children }: TreeElementProps): ReactNodeRender a list of tree elements as a stack of cards.
TreeCards({ children }: TreeCardsProps): ReactNodeProvide a tree to descendants as a flattened lookup map (see flattenTree()).
TreeProvider({ tree, children }: { readonly tree: TreeElement; readonly children: ReactNode }): ReactNodeSidebar built from the surrounding tree, in three sections separated by dividers.
TreeSidebar({ children }: TreeSidebarProps): ReactNodeDefault menu item renderer for any tree-* element.
TreeMenuItem({ path, name, title, children }: TreeElementProps): ReactNodeSidebar navigation menu built from the children of a root tree element.
TreeMenu({ tree }: TreeMenuProps): ReactNodeTop-level app component for a tree-based documentation site.
TreeApp({ tree, routes, sidebar = <TreeSidebar />, ...meta }: TreeAppProps): ReactElementRoot component for an application, providing the top-level Meta context and global styles.
App({ children, ...meta }: AppProps): ReactElementDeleted text — renders a <del> element to mark content removed from a document.
Deleted({ children, ...props }: DeletedProps): ReactElementSmall print — renders a <small> element for side comments and fine print.
Small({ children, ...props }: SmallProps): ReactElementInline link — delegates to <Clickable>, rendering an <a> (when href is set) or <button> (when onClick is set).
Link(props: LinkProps): ReactElement
Highlighted text — renders a <mark> element to call attention to a run of text.
Mark({ children, ...props }: MarkProps): ReactElementStrong importance — renders a <strong> element for text of strong importance (typically bold).
Strong({ children, ...props }: StrongProps): ReactElementRelative time — shows a signed string like in 6d or 3w ago wrapped in a <time> element carrying the machine-readable date.
When(props: WhenProps): ReactElement
Elapsed time — shows an unsigned string like 6d or 3w for a past date wrapped in a <time> element carrying the machine-readable date.
Ago(props: AgoProps): ReactElement
Remaining time — shows an unsigned string like 6d or 3w for a future date wrapped in a <time> element carrying the machine-readable date.
Until(props: UntilProps): ReactElement
Superscript text — renders a <sup> element for typographically raised text (e.g. exponents, footnote markers).
Superscript({ children }: SuperscriptProps): ReactElementSubscript text — renders a <sub> element for typographically lowered text (e.g. chemical formulae).
Subscript({ children }: SubscriptProps): ReactElementInline code span — renders a <code> element.
Code({ children, plain, ...props }: CodeProps): ReactElementEmphasised text — renders an <em> element for stress emphasis (typically italic).
Emphasis({ children, ...props }: EmphasisProps): ReactElementStyled inline text — renders a <span> carrying only the colour and typography variant classes, with no styling of its own.
Span({ children, ...props }: SpanProps): ReactElementInserted text — renders an <ins> element to mark content added to a document.
Inserted({ children, ...props }: InsertedProps): ReactElementRender a documented type's data members (properties, getters/setters) as a scrollable table — one row per property.
DocumentationProperties({ properties }: DocumentationPropertiesProps): ReactNodeRender a documented symbol's @throws entries as a scrollable table — one row per thrown type.
DocumentationThrows({ throws }: DocumentationThrowsProps): ReactNodeCard renderer for a tree-documentation element — a compact summary card linking to the symbol's detail page.
DocumentationCard({
path,
title,
name,
kind,
description,
signatures,
// Drop `class` so cards omit the "member of" relation — a member card almost always sits on its own class's page already.
class: _memberOf,
...props
}: DocumentationElementProps): ReactNodeRender a symbol's relational metadata as a <nav> column of labelled links.
DocumentationButtons({
space = "paragraph",
wrap = true,
left = true,
gap = "none",
...props
}: DocumentationButtonsProps): ReactElement | nullRender a documented symbol's parameters as a scrollable table — one row per parameter.
DocumentationParams({ params }: DocumentationParamsProps): ReactNodeRender a documentation table's Type column — one linked token per union member, each stacked on its own line.
DocumentationType({ members }: DocumentationTypeProps): ReactNodeRender a documentation table row's description cell.
DocumentationDescription({ description, default: def, optional, readonly }: DocumentationDescriptionProps): ReactNodePage listing every element in the system in one flat, searchable view.
DocumentationSearchPage(): ReactNode
Colour-coded tag for a documented symbol's kind.
DocumentationKind({ kind = "unknown", ...props }: DocumentationKindProps): ReactElementPage renderer for a tree-documentation element — the full detail page for a documented symbol.
DocumentationPage({
title,
name,
kind = "unknown",
description,
content,
signatures,
params,
returns,
throws,
properties,
types,
examples,
children,
...props
}: DocumentationElementProps): ReactNodeRender a documented symbol's signature(s) as monospace code blocks — one <Preformatted> per overload.
DocumentationSignatures({ signatures }: DocumentationSignaturesProps): ReactNodeRender a documented symbol's @returns entries as a scrollable table — one row per return type.
DocumentationReturns({ returns }: DocumentationReturnsProps): ReactNodeRender a type alias's referenced type names as a scrollable table — one row per referenced type.
DocumentationReferences({ types }: DocumentationReferencesProps): ReactNodeA <menu> list of <MenuItem> children.
Menu({ children, ...props }: MenuProps): ReactNodeA <li> containing an <a> link, plus optional submenu content shown when this item is "proud".
MenuItem({ href, children, ...props }: MenuItemProps): ReactNodeRepeating input that edits an array of items, adding a SchemaInput row per item.
ArrayInput(props: ArrayInputProps<T>): ReactElement
Composite input that edits a data object by rendering a SchemaInput for each property schema.
DataInput(props: DataInputProps<T>): ReactElement
Output a list of <RadioInput> elements for each item in a set of ChoiceOptions in { key: title } format.
ChoiceRadioInputs(props: ChoiceRadioInputsProps<T>): ReactElement
Return either a <button> or an <a href=""> styled as an input, based on whether an onClick or href prop is provided.
ButtonInput({ title, placeholder, children = title, ...props }: ButtonInputProps): ReactElementShow the appropriate input control for a schema, dispatching on the schema's concrete type.
SchemaInput(props: SchemaInputProps<T>): ReactElement
Show a DateInput for a DateSchema.
DateSchemaInput({ schema, value, ...props }: DateSchemaInputProps): ReactElementShow a NumberInput for a NumberSchema, formatting values with the schema's format().
NumberSchemaInput({ schema, value, ...props }: NumberSchemaInputProps): ReactElementShow a choice input for a ChoiceSchema — radio inputs for up to 8 options, otherwise a select.
ChoiceSchemaInput({ schema, value, ...props }: ChoiceSchemaInputProps): ReactElementShow a CheckboxInput for a BooleanSchema.
BooleanSchemaInput({ schema, value, ...props }: BooleanSchemaInputProps): ReactElementShow a TextInput for a StringSchema, sanitising and formatting values with the schema.
StringSchemaInput({ schema, value, ...props }: StringSchemaInputProps): ReactElementShow an ArrayInput for an ArraySchema.
ArraySchemaInput({ schema, value, ...props }: ArraySchemaInputProps): ReactElementShow a DictionaryInput for a DictionarySchema.
DictionarySchemaInput({ schema, value, ...props }: DictionarySchemaInputProps): ReactElementShow a DataInput for a nested DataSchema.
DataSchemaInput({ schema, value, ...props }: DataSchemaInputProps): ReactElementShow the appropriate input for a schema, wrapped in a <Field> with its label and message.
SchemaField({ schema, children, ...props }: SchemaFieldProps): ReactElementDropdown input bound to a string value, rendered as a <select> of the provided options.
SelectInput(props: SelectProps<T>): ReactElement
Show static read-only content styled as an input, falling back to placeholder when empty.
OutputInput({ title, placeholder, children = title, ...props }: OutputInputProps): ReactElementWraps an input with support for absolutely-positioned data-slot icon elements on either side.
InputWrapper({ children }: ChildProps): ReactElementRepeating input that edits a dictionary, with an editable key and schema-validated value per entry.
DictionaryInput(props: DictionaryInputProps<T>): ReactElement
Parse a markup string and render the resulting elements inline.
Markup({ children, ...options }: MarkupProps): ReactNodeAnimated loading spinner shaped like a Heroicon — a faint track plus a rotating indicator arc.
Loading({ className }: { className?: string | undefined }): ReactElementLoad a component.
Loader({ children, fallback = LOADING }: LoaderProps): ReactElementLoad a page.
PageLoader({ children, fallback = <CenteredLayout>{LOADING}</CenteredLayout> }: LoaderProps): ReactElementReact error boundary that renders a fallback component when any descendant throws.
new Catcher()
Render a caught error as an inline <Notice> with a retry button.
ErrorNotice({ reason }: ErrorProps): ReactElementError boundary for a whole page that renders a full <ErrorPage> fallback on error.
PageCatcher({ children }: ChildProps): ReactElementRender a caught error as a full-page <Page> with a centered <ErrorNotice>.
ErrorPage({ reason }: ErrorProps): ReactElementRender the icon for a given status, coloured to match.
Icon(props: IconProps): ReactElement
Small inline label used to annotate other content.
Tag(props: TagProps): ReactElement
Read the current NavigationStore from context, throwing if used outside <Navigation>.
requireNavigation(): NavigationStore
Read the current DialogsStore from the nearest <DialogsContext>.
requireDialogs(): DialogsStore
Publish the current form's "main" (unnamed) message as a global success notice whenever it changes.
FormNotify(): void
Hook that returns the current form's FormStore from context.
requireForm(caller?: AnyCaller): FormStore<T>
Hook that returns the input props for a single named field of a form.
useField(name: string, form?: FormStore<{ [name: string]: T }>): SchemaInputProps<Schema<T>, I>Run a form submit callback and publish success/error notices based on its return or thrown value.
callNotifiedForm(value: T, store: FormStore<T>, form: HTMLFormElement, callback?: NoticeCallback<[T, ...A]>, ...args: A): boolean | Promise<boolean>
Await a pending submit result and publish a success or error notice to a form once it settles.
awaitNotifiedForm(store: FormStore<T>, form: HTMLFormElement, pending: PromiseLike<ReactNode | undefined | void>): Promise<boolean>
Notify the user about a value thrown during submit, storing string errors as form field messages.
notifyThrownForm(store: FormStore<T>, form: HTMLFormElement, thrown: unknown): false
Status-coloured paragraph used for inline feedback messages.
Message({ children, ...props }: MessageProps): voidSubmit button for a form that disables itself and shows a spinner while the form is busy.
SubmitButton({
children = _SUBMIT_CHILDREN,
strong = true,
color = "primary",
full = true,
...props
}: SubmitButtonProps): ReactElementRender an <a href=""> element, resolving its href against the current page URL and marking it active when it matches.
LinkClickable({
href,
disabled = !href,
target,
download,
title,
children = "Go",
className,
}: StylableClickableProps): ReactElementRender a <button> element that runs its onClick handler through a BusyStore and shows a loading spinner while busy.
ButtonClickable({
onClick,
disabled = !onClick,
title,
children = "Click",
className,
}: StylableClickableProps): ReactElementRender a non-interactive <span> element, used as the fallback when neither href nor onClick is provided.
SpanClickable({
title,
children = "Click", //
className,
}: StylableClickableProps): ReactElementGet the full combined className string for a button from its styling variants.
getButtonClass(variants: ButtonVariants): string
Type-safe passthrough for React's addTransitionType() that checks type is one of our known view-transition types.
setTransitionType(type: TransitionType): void
Show any kind of contact data, rendered as an <address>.
Address({ children, ...props }: AddressProps): voidHorizontal rule separating blocks of content — rendered as <hr>.
Divider(props: DividerProps): void
Re-render a component automatically on a fixed interval.
useRefresh(interval: number): void
Call event.preventDefault() on an event.
eventPreventDefault(e: Pick<Event, "preventDefault">): void
Focus on the first focusable element inside an element.
focusFirstFocusable(el: Nullish<Element>): void
Loop focus inside an element so it can't escape — refocus the first focusable child when focus moves out.
loopFocus(element: Nullish<Element>, nextTarget: Nullish<Element>): void
Loop focus inside an element in response to a blur event — a ready-made onBlur handler that traps focus.
eventLoopFocus({ currentTarget, relatedTarget }: { currentTarget: Element; relatedTarget: Element | null }): voidHold a piece of state that only updates after a debounce delay since the last set.
useDebouncedState(initial: T, delay = 500): [T, (v: T) => void]
Wrap a callback so it only runs after a debounce delay since the last invocation.
useDebouncedCallback(callback: (() => void) | undefined, delay = 500): () => void
Use the value of a React Context, or throw RequiredError if the context was unset.
requireContext(context: Context<T | null>, caller?: AnyCaller): T
requireContext(context: Context<T | undefined>, caller?: AnyCaller): T
requireContext(context: Context<T>, caller?: AnyCaller): T
Turn a deconstructed MetaCSP into a Content-Security-Policy string.
joinMetaCSP(csp: Nullish<MetaCSP>): string | undefined
Join several page or site titles together with - , skipping empty values.
joinTitles(...titles: (string | undefined)[]): string
Merge a PossibleMeta onto an existing Meta, resolving URLs and assets in the process.
mergeMeta(meta1: Meta, meta2: PossibleMeta, caller: AnyCaller = mergeMeta): Meta
Create a fully-formed Meta from a PossibleMeta.
createMeta(meta: PossibleMeta, caller: AnyCaller = createMeta): Meta
Merge a new metadata URL onto the current one, resolving it and applying params.
mergeMetaURL(base: ImmutableURL | undefined, current: ImmutableURL | undefined, next: PossibleURL | undefined, params: PossibleURIParams | undefined, caller: AnyCaller = mergeMetaURL): ImmutableURL | undefined
Merge two sets of meta <meta> tags, with next taking precedence over current.
mergeMetaTags(current: MetaTags | undefined, next: MetaTags | undefined): MetaTags | undefined
Merge two meta <link> lists, resolving the new hrefs to absolute URIs.
mergeMetaLinks(current: MetaLinks | undefined, next: PossibleMetaLinks | undefined, url: ImmutableURL | undefined, root: ImmutableURL | undefined, caller: AnyCaller = mergeMetaLinks): MetaLinks | undefined
Merge two meta asset lists (modules, scripts, stylesheets), resolving the new hrefs to absolute URIs.
mergeMetaAssets(current: MetaAssets | undefined, next: PossibleMetaAssets | undefined, url: ImmutableURL | undefined, root: ImmutableURL | undefined, caller: AnyCaller = mergeMetaAssets): MetaAssets | undefined
Fire callbacks when a referenced element enters or leaves the visible scrolling area.
useScrollIntersect(onEnter?: Nullish<Callback>, onLeave?: Nullish<Callback>): RefObject<T | null>
Find the most-visible entry in a list of IntersectionObserverEntry objects.
getMostVisibleObserverEntry(entries: IntersectionObserverEntry[]): IntersectionObserverEntry | undefined
Parse a list of possible className strings and join them into a single string.
getClass(...classes: unknown[]): string
Parse a list of possible className strings, match them in a CSSModule dictionary, and join them into a single string.
getModuleClass(module: CSSModule | string, ...classes: unknown[]): string | undefined
Notify the user with a message by dispatching a notice event.
notify(message: ReactNode, status?: Status | undefined, el: EventTarget = window): void
Notify the user with a success message by dispatching a notice event with "success" status.
notifySuccess(message: ReactNode, el?: EventTarget): void
Notify the user with an error message by dispatching a notice event with "error" status.
notifyError(message: ReactNode, el?: EventTarget): void
Look at a thrown value, extract a viable message from it, and dispatch an error notice.
notifyThrown(thrown: unknown, el?: EventTarget): void
Subscribe to notice events on an element and call a callback when they happen.
subscribeNotices(callback: (message: ReactNode, status?: Status | undefined) => void, el: EventTarget = window): () => void
Run a callback and dispatch a success or error notice to the window based on its return or throw.
callNotified(callback: NoticeCallback<A>, ...args: A): boolean | Promise<boolean>
Await a pending value and dispatch a success or error notice to the window based on its resolution.
awaitNotified(pending: PromiseLike<ReactNode | undefined | void>): Promise<boolean>
Run a callback and dispatch a success or error notice to a specific element based on its return or throw.
callNotifiedElement(el: EventTarget | undefined, callback: NoticeCallback<A>, ...args: A): boolean | Promise<boolean>
Await a pending value and dispatch a success or error notice to a specific element based on its resolution.
awaitNotifiedElement(el: EventTarget | undefined, pending: PromiseLike<ReactNode | undefined | void>): Promise<boolean>
Get the typography class for a component from its typographic variant props.
getTypographyClass({ tint, weight, font, case: caseValue, size, ...props }: TypographyVariants): stringGet the drop-shadow class for a component from its shadow variant prop.
getShadowClass({ shadow }: ShadowVariants): string | undefinedGet the combined className string for a block from its styling variants.
getBlockClass(variants: BlockVariants): string
Get the width class for a component from its width / grow variant props.
getWidthClass({ width, grow }: WidthVariants): string | undefinedGet the border-thickness class for a component from its stroke variant prop.
getStrokeClass({ stroke }: StrokeVariants): string | undefinedGet the inline-padding ("indent") class for a component from its indent variant prop.
getIndentClass({ indent }: IndentVariants): string | undefinedGet the scroll class for a component from its horizontal / vertical variant props.
getScrollClass({ horizontal, vertical }: ScrollVariants): stringGet the block-padding class for a component from its padding variant prop.
getPaddingClass({ padding }: PaddingVariants): string | undefinedCSS class that applies color tinting to an element.
getColorClass({ color }: ColorVariants): string | undefinedGet the corner-radius class for a component from its radius variant prop.
getRadiusClass({ radius }: RadiusVariants): string | undefinedGet the flex layout class for a component from its flex variant props.
getFlexClass(variants: FlexVariants): string
Get the gap class for a component from its gap variant prop.
getGapClass({ gap }: GapVariants): string | undefinedGet the status tint class for a component from its status variant prop.
getStatusClass({ status }: StatusVariants): string | undefinedGet the block spacing class for a component from its space="" variant prop.
getSpaceClass({ space }: SpaceVariants): string | undefinedGet the transition-duration class for a component from its duration variant prop.
getDurationClass({ duration }: DurationVariants): string | undefinedUse the flattened tree lookup map from context.
useTreeMap(): ReadonlyMap<string, TreeElement>
Resolve a reference string to its tree element — by exact key first, then by a normalised key with the prose display decorations stripped.
getTreeElement(map: ReadonlyMap<string, TreeElement>, ref: string): TreeElement | undefined
Match an element that should appear in the sidebar menu.
matchMenuElement(element: Element): boolean
Documentation app.
DocumentationApp({
tree,
routes = {
"/search": DocumentationSearchPage,
},
sidebar = (
<TreeSidebar>
<Menu>
<MenuItem href="/search">Search</MenuItem>
</Menu>
</TreeSidebar>): voidSplit a type expression on | into its individual union members.
splitType(type: string): { readonly members: readonly string[]; readonly optional: boolean }Get the raw colour variant for a documented symbol's kind, or undefined for an unknown kind.
getDocumentationKindColor(kind: string): ColorVariant | undefined
Whether a schema is required, i.e. not wrapped in an OptionalSchema or NullableSchema.
isSchemaRequired(schema: Schema): boolean
Checkbox input bound to a boolean value, rendered as a labelled <input type="checkbox">.
CheckboxInput({
name,
title,
placeholder = title || "Yes",
required = false,
disabled = false,
message = "",
value = false,
onValue,
children = placeholder,
...props
}: CheckboxProps): ReactElementCombo box that queries a list of items and lets the user pick one from a popover.
QueryInput({
empty = "No results",
value,
onValue,
onQuery,
formatter = formatValue,
...props
}: QueryInputProps<I, O>): ReactElementA button that, when clicked, shows a popover next to it when clicked or focused.
ButtonPopover({
children: [buttonChildren, ...popoverChildren], //
...props
}: ButtonPopoverProps): ReactElementTrigger element that reveals a floating popover panel beside it when active or focused.
Popover({
children: [trigger, ...popover], //
onClose,
open = popover.flat().some(isTruthy),
}: PopoverProps): ReactElementNumeric input bound to a number value, parsing typed text and reformatting it on blur.
NumberInput({
name,
title = "",
placeholder = title, // Placeholder must be defined or `:placeholder-shown` CSS rules won't show.
required = false,
disabled = false,
message = "",
value,
onValue,
// min = Number.NEGATIVE_INFINITY,
// max = Number.POSITIVE_INFINITY,
formatter = formatNumber,
...variants
}: NumberInputProps): ReactElementBuild the shared base className for a form input from its styling variants — the base input class plus any InputVariants.
getInputClass(props: InputVariants): string
File picker input that emits the selected File through onValue.
FileInput({
name,
title,
placeholder = title,
required = false,
disabled = false,
message,
// value,
onValue,
types = {},
...variants
}: FileInputProps): ReactElementDate, time, or datetime input that accepts a PossibleDate and emits an ISO string value.
DateInput({
name,
title = "",
placeholder = title, // Placeholder must be defined or `:placeholder-shown` CSS rules won't show.
required = false,
disabled = false,
message = "",
value,
onValue,
min,
max,
input = "date",
step,
...variants
}: DateInputProps): ReactElementSingle <input type="radio"> wrapped in a <label> styled as an <Input>.
RadioInput({
name,
title,
placeholder = title || "Choose",
required = false,
disabled = false,
message = "",
value = false,
onValue,
children = placeholder,
...props
}: RadioInputProps): ReactElementAn input button that, when clicked, shows a popover next to it when clicked or focused.
ButtonInputPopover({
children: [buttonChildren, ...popoverChildren], //
...props
}: ButtonInputPopoverProps): ReactElementOutput a list of <RadioInput> elements for each item in an array.
ArrayRadioInputs({
value,
onValue,
required = false,
items,
formatter = formatValue,
...props
}: ArrayRadioInputsProps<T>): ReactElementText input bound to a string value, rendered as an <input> or a <textarea> when rows > 1.
TextInput({
name,
title = "",
placeholder = title, // Placeholder must be defined or `:placeholder-shown` CSS rules won't show.
required = false,
disabled = false,
message = "",
value,
onValue,
input = "text",
min = 0,
max = Number.POSITIVE_INFINITY,
rows = 1,
formatter = PASSTHROUGH,
...variants
}: TextInputProps): ReactElementRead the current Meta context, optionally merging in additional meta data.
requireMeta(meta?: PossibleMeta): Meta
Read the current Meta context and derive URL helpers (path and params) from its url.
requireMetaURL(meta?: PossibleMeta, caller: AnyCaller = requireMetaURL): MetaURL
Create a [Mapping, Mapper] pair of components backed by their own private React context.
createMapper(defaults: Mapping = {}): [Mapping: FunctionComponent<MappingProps>, Mapper: FunctionComponent<MapperProps>]Build the combined className string for a <Tag> from its styling variants.
getTagClass(variants: TagVariants): void
Store holding the current navigation URL and driving browser history.
new NavigationStore(url: PossibleURL = typeof window === "undefined" ? "/" : window.location.href, base?: PossibleURL)
Store holding the live list of open <Dialog> elements.
new DialogsStore()
Reactive store holding the current (possibly partial and invalid) value of a form, plus its field messages.
new FormStore<T>(schema: DataSchema<T>, partialData: Partial<T> = {}, messages?: ImmutableDictionary<string> | string | undefined)Store holding a single notice's content and status, owned by a NoticesStore.
new NoticeStore<S>(notices: NoticesStore<S>, children?: ReactNode | null, status?: S | undefined)
Store holding the live list of NoticeStore notices currently shown.
new NoticesStore<S>()
Props for <RouteCache> — the maxCached size and the content children to keep alive per URL.
{
readonly maxCached?: number | undefined;
readonly children: ReactNode;
}Props for <Navigation> — initial Meta (url/base) plus optional children.
{}Props for <Router> — the routes to match against plus an optional fallback.
{
readonly routes: Routes;
readonly fallback?: ReactElement | undefined | null;
}Props for <Modal> — optional children content.
{}Props for <Dialog> — optional children content and an onClose callback.
{
onClose?: Callback;
}Props for <DialogCloseButton> — button styling variants and optional children to override the X icon.
{}Props for <DialogsContext> — the children subtree the dialogs store is provided to.
{}Props for <Dialogs> — takes no props (branded empty interface).
{
readonly [_componentProps]?: never;
}Props for FormInput, a bare SchemaInput bound to a named form field.
{}Props for Progress, a continuous horizontal progress bar.
{
value?: Nullish<number>;
min?: number;
max?: number;
}Props for Form, the schema-driven form wrapper component.
{
schema: DataSchema<T>;
data?: PartialData<T> | undefined;
submit?: ReactNode | undefined;
onSubmit?: FormCallback<T> | undefined;
messages?: ImmutableDictionary<string> | string | undefined;
}Props for Field, a labelled wrapper around a form control.
{
title?: ReactNode | undefined;
description?: ReactNode | undefined;
message?: ReactNode | undefined;
required?: boolean | undefined;
}Props for FormFooter, the submit-button-and-message footer for a form.
{
submit?: ReactNode | undefined;
}Props for <Notice> — flex/colour/status styling variants, optional children, and an optional icon.
{
icon?: ReactElement | false | undefined;
}Props for <Message> — paragraph props plus colour and status styling variants.
{}Props for <Notices> — flex styling variants for the notices container.
{}Props for <Page> — per-page Meta (title, description, etc.) plus the page children.
{}Props for <HTML> — initial Meta (language/root/app) plus the page children.
{}Component props for a <FullscreenButton>
{
target?: string;
}Component props for <RetryButton>
{}Component props for <SubmitButton>, a form submit button.
{}Props for a thing that can be clicked — either has a string href link or an onClick callback handler.
{
disabled?: boolean | undefined;
href?: ImmutableURI | Path | URIString | undefined;
onClick?: ClickableCallback | undefined;
target?: string | undefined;
download?: string | undefined;
title?: string | undefined;
}Props for a clickable that also accepts a className for styling.
{
className?: string | undefined;
}Styling variants for a Button, combining flex, color, status, and typography options with button-specific toggles.
{
strong?: boolean | undefined;
plain?: boolean | undefined;
outline?: boolean | undefined;
small?: boolean | undefined;
full?: boolean | undefined;
}Component props for a <Button> component.
{}Props for Cell — width and typography variants plus children.
{
header?: boolean | undefined;
}Props for Table — colour, space, typography, and width variants plus children.
{}Props for the VerticalTransition component — the shared transition variant props.
{}Props for the CollapseTransition component — the shared transition variant props.
{}Props for the HorizontalTransition component — the shared transition variant props.
{}Props for the FadeTransition component — the shared transition variant props.
{}Variant props shared by every transition component.
{
overlay?: boolean | undefined;
}React props for <Transition> component.
{
default?: string | undefined;
forward?: string | undefined;
back?: string | undefined;
}Props for Image — an src, optional alt text, plus space and width variants.
{
src: string;
alt?: string;
}Props for the <Row> component.
{
as?: BlockElement | undefined;
}Props for Label — identical to HeadingProps.
{}Props shared by <Title>, Heading, and <Subheading> — colour, space, and typography variants plus a heading-level override.
{
level?: "1" | "2" | "3" | "4" | "5" | "6" | 1 | 2 | 3 | 4 | 5 | 6;
}Props for Block — colour, space, typography, and width variants plus an optional as element override.
{
as?: BlockElement | undefined;
}Props for Card — combines ClickableProps (for navigable cards) with colour, status, padding, space, typography, width, and shadow variants.
{
as?: BlockElement | undefined;
}Props for Panel — colour, status, and typography variants plus optional children.
{
as?: BlockElement | undefined;
}Props for Definitions — colour, gap, space, and typography variants plus optional children.
{}Props for the <Column> component.
{
as?: BlockElement | undefined;
}Props for Blockquote — colour, space, and typography variants plus optional children.
{}Props for Section and its semantic siblings — colour, space, typography, and width variants plus an optional as element override.
{
as?: BlockElement | undefined;
}Props for Address — colour, space, and typography variants plus required children.
{}Props for PhysicalAddress — an optional name and a nullable AddressData object.
{
name?: Nullish<string>;
address: Nullish<AddressData>;
}Props for EmailAddress — an optional name and a nullable email string.
{
name?: Nullish<string>;
email: Nullish<string>;
}Props for DetailsItem — a single collapsible disclosure.
{
title: ReactNode;
open?: boolean | undefined;
name?: string | undefined;
children: ReactNode;
}Props for List — colour, gap, space, and typography variants plus its list items and an ordered toggle.
{
readonly children: ImmutableArray<ReactNode>;
readonly ordered?: boolean | undefined;
}Props for Caption — colour, space, and typography variants plus optional children.
{}Props for Preformatted — space, colour, typography, width, and padding variants plus a wrap toggle.
{
wrap?: boolean | undefined;
}Props for Divider — space and colour variants.
{}Props for Video — space and width variants plus optional children.
{}Props for Prose — just the longform children to style.
{}Props for Paragraph — colour, space, and typography variants.
{}Combined meta data for a website page — title, URLs, description, CSP, tags, links, and assets.
{
readonly root?: ImmutableURL | undefined;
readonly url?: ImmutableURL | undefined;
readonly app?: string | undefined;
readonly title?: string | undefined;
readonly description?: string | undefined;
readonly image?: string | undefined;
readonly language?: string | undefined;
readonly csp?: MetaCSP | undefined;
readonly tags?: MetaTags | undefined;
readonly links?: MetaLinks | undefined;
readonly modules?: MetaAssets | undefined;
readonly scripts?: MetaAssets | undefined;
readonly stylesheets?: MetaAssets | undefined;
}Input metadata that can be parsed and converted to a fully-resolved Meta.
{
readonly root?: PossibleURL | undefined;
readonly url?: PossibleURI | undefined;
readonly params?: PossibleURIParams | undefined;
readonly links?: PossibleMetaLinks | undefined;
readonly modules?: PossibleMetaAssets | undefined;
readonly scripts?: PossibleMetaAssets | undefined;
readonly stylesheets?: PossibleMetaAssets | undefined;
}Props for a component that requires children.
{
readonly children: ReactNode;
}Props for a component that optionally accepts children.
{
readonly children?: ReactNode | undefined;
}Dictionary of boolean variant flags whose true-valued keys become class names.
{
readonly [key: string]: boolean;
}Typographic variant props — colour, font-family, weight, case, size, tint, alignment, and wrap, applied via getTypographyClass()
{
size?: SizeVariant | undefined;
tint?: TintVariant | undefined;
font?: FontVariant | undefined;
case?: CaseVariant | undefined;
weight?: WeightVariant | undefined;
left?: boolean | undefined;
center?: boolean | undefined;
right?: boolean | undefined;
wrap?: boolean | undefined;
nowrap?: boolean | undefined;
}Variant props for the drop shadow of an element, e.g. shadow="large".
{
shadow?: ShadowVariant | undefined;
}Variants for block level elements.
{}Variant props that set (or unconstrain) a component's width, e.g. width="narrow" or width="12x".
{
width?: WidthVariant | undefined;
grow?: boolean | undefined;
}Variant props for the border thickness of a component, e.g. stroke="thick".
{
stroke?: StrokeVariant | undefined;
}Variant props for the inline-padding ("indent", left + right) of a component, e.g. indent="normal".
{
indent?: IndentVariant | undefined;
}Variant props selecting which scroll axes are enabled on an element.
{
vertical?: boolean | undefined;
horizontal?: boolean | undefined;
}Props for the Scroll component — children plus scroll-axis variants.
{}Variant props for the block-padding (top + bottom) of a component, e.g. padding="large".
{
padding?: SpaceValue | undefined;
}Variant props for colouring an element, e.g. color="purple".
{
color?: ColorVariant | undefined;
}Variant props for the corner radius of an element, e.g. radius="large".
{
radius?: RadiusVariant | undefined;
}Variant props for flex layout — opt-in modifiers any component can mix in via getFlexClass().
{
wrap?: boolean | undefined;
nowrap?: boolean | undefined;
column?: boolean | undefined;
reverse?: boolean | undefined;
stretch?: boolean | undefined;
between?: boolean | undefined;
around?: boolean | undefined;
left?: boolean | undefined;
center?: boolean | undefined;
right?: boolean | undefined;
top?: boolean | undefined;
middle?: boolean | undefined;
bottom?: boolean | undefined;
baseline?: boolean | undefined;
}Variant props for the gap between a component's children, e.g. gap="large".
{
gap?: SpaceValue | undefined;
}Variant props for the semantic status of an element, e.g. status="success".
{
status?: Status | undefined;
}Variants to control block spacing on components, e.g. space="large".
{
space?: SpaceValue | undefined;
}Variant props for the transition duration of an element, e.g. duration="fast".
{
duration?: DurationValue | undefined;
}Props for <SidebarLayout> — the sidebar column content, main children, and a right placement flag.
{
sidebar: ReactNode;
right?: boolean | undefined;
}Props for <CenteredLayout> — optional children plus width (of the centred column) and padding / indent (block / inline padding of the scroll area) variants.
{}Props for the TreeButton component — the element reference plus button variants.
{
readonly name: string;
readonly children?: ReactNode | undefined;
}Props for the TreeLink component — the element reference plus an optional label.
{
readonly name: string;
}Props for the TreeRouter component — the tree to route plus an optional fallback and app meta.
{
readonly fallback?: ReactElement | undefined | null;
}Props for the TreeBreadcrumbs component — typography, space, and flex variant props.
{}Props for the TreeCards component — the tree elements to render as cards.
{
readonly children?: TreeElements;
}Props for the TreeSidebar component.
{}Props for the TreeMenu component — the root tree element plus its URL path.
{
readonly tree: TreeElement;
}Props for the TreeApp component — the tree to render plus optional extra routes and app meta.
{
tree: TreeElement;
sidebar?: ReactElement | undefined;
routes?: Routes | undefined;
}Props for <App> — the root Meta plus the application children.
{}Props for Deleted — colour and typography variants, plus optional children.
{}Props for Small — optional children.
{}Props for Link — ClickableProps (href for navigation or onClick for actions) plus colour and typography variants.
{}Props for Mark — optional children.
{}Props for Strong — optional children.
{}Props for When, Ago, and Until — a target date plus an optional current reference date and full toggle.
{
target: PossibleDate | undefined;
current?: PossibleDate | undefined;
full?: boolean | undefined;
}Props for Ago — identical to WhenProps.
{}Props for Until — identical to WhenProps.
{}Props for Superscript — optional children.
{}Props for Subscript — optional children.
{}Props for Code — colour and typography variants, optional children, plus a plain toggle.
{
plain?: boolean | undefined;
}Props for Emphasis — optional children.
{}Props for Span — colour and typography variants, plus optional children.
{}Props for Inserted — colour and typography variants, plus optional children.
{}Props for DocumentationProperties — the data members of a class/interface/object-literal type to render, one row each.
{
readonly properties?: ImmutableArray<DocumentationParam> | undefined;
}Props for DocumentationThrows — the @throws entries to render, one row each.
{
readonly throws?: ImmutableArray<DocumentationThrow> | undefined;
}Props for DocumentationButtons — the relational metadata of a documented symbol (class, extends, implements), plus block-space and flex overrides.
{
readonly class?: string | undefined;
readonly extends?: string | undefined;
readonly implements?: ImmutableArray<string> | undefined;
}Props for DocumentationParams — the parameter list to render, one row per parameter.
{
readonly params?: ImmutableArray<DocumentationParam> | undefined;
}Props for DocumentationType — the union members to render (see splitType()).
{
readonly members: readonly string[];
}Props for DocumentationDescription — a description cell's resolved text, plus an optional default/optionality note.
{
readonly description?: string | undefined;
readonly default?: string | undefined;
readonly optional?: boolean | undefined;
readonly readonly?: boolean | undefined;
}Props for DocumentationKind — a TagProps plus the documented symbol's kind.
{
readonly kind: string;
}Props for DocumentationSignatures — the type signatures to render, one block per overload.
{
readonly signatures?: ImmutableArray<string> | undefined;
}Props for DocumentationReturns — the @returns entries to render, one row each.
{
readonly returns?: ImmutableArray<DocumentationReturn> | undefined;
}Props for DocumentationReferences — the referenced type names to render, one row each.
{
readonly types?: ImmutableArray<string> | undefined;
}Props for <Menu> — optional <MenuItem> children.
{}Props for <MenuItem> — <Clickable> props plus children whose first node is the label and the rest the submenu.
{
readonly children: ReactNode | readonly [ReactNode, ...ReactNode[]];
}Props for ArrayInput, a repeating input that edits an array of schema-validated items.
{
one?: string;
many?: string;
min?: number | undefined;
max?: number | undefined;
items: Schema<T>;
}Props for DataInput, a composite input that edits an object of schema-validated sub-fields.
{
props: Schemas<T>;
}Props for ChoiceRadioInputs, which renders a radio for each entry in a ChoiceOptions set.
{
options: ChoiceOptions<T>;
wrap?: boolean;
column?: boolean;
}Props for ButtonInput, a clickable element styled to match form inputs.
{}Props for SchemaInput and its variants: a schema plus the value input props it drives.
{
schema: T;
}Props for DateSchemaInput, the DateSchema input variant.
{}Props for NumberSchemaInput, the NumberSchema input variant.
{}Props for ChoiceSchemaInput, the ChoiceSchema input variant.
{}Props for BooleanSchemaInput, the BooleanSchema input variant.
{}Props for StringSchemaInput, the StringSchema input variant.
{}Props for ArraySchemaInput, the ArraySchema input variant.
{}Props for DictionarySchemaInput, the DictionarySchema input variant.
{}Props for DataSchemaInput, the DataSchema input variant.
{}Props for SchemaField: SchemaInput props plus optional children to override the input.
{}Props for CheckboxInput, a boolean-valued checkbox input.
{}Props for SelectInput, a dropdown <select> bound to a string value.
{
options: ChoiceOptions<T>;
}Props for QueryInput, a combo box that queries items of type O from an input of type I.
{
schema: Schema<I>;
onQuery: PayloadFetchCallback<I, ImmutableArray<O> | undefined>;
formatter?: ((value: O) => string) | undefined;
empty?: ReactNode | undefined;
}Props for ButtonPopover, a button that toggles an adjacent popover.
{
children: PopoverChildren;
}Props for Popover, a trigger element that reveals floating content.
{
children: PopoverChildren;
onClose?: Callback;
open?: boolean;
}Props for OutputInput, a read-only <output> styled to match form inputs.
{}Props for NumberInput, a text-based numeric input bound to a number value.
{
min?: number | undefined;
max?: number | undefined;
formatter?: NumberFormatter | undefined;
}Styling variants shared by every form input — currently the width variant (width="narrow", "normal", "wide", "full", "fit").
{}Base props shared by every form input (name, title, placeholder, required/disabled state, and error message).
{
name: string;
title?: string | undefined;
placeholder?: string | undefined;
required?: boolean | undefined;
disabled?: boolean | undefined;
message?: string | undefined;
}"Value inputs" are inputs that generate a value, like <input> or <textarea>
{
value?: O | I | undefined;
onValue(value: O | undefined): void;
}Props for FileInput, an <input type="file"> that emits the selected File.
{
types?: FileTypes | undefined;
}Props for DateInput, a date/time <input> that emits an ISO string value.
{
min?: PossibleDate | undefined;
max?: PossibleDate | undefined;
input?: DateInputType | undefined;
step?: number | undefined;
}Props for RadioInput, a single labelled radio button styled as an input.
{}Props for ButtonInputPopover, an input button that toggles an adjacent popover.
{
children: PopoverChildren;
}Props for ArrayRadioInputs, which renders a radio for each item in an array of values.
{
items: ImmutableArray<T>;
formatter?: ((value: T) => ReactNode) | undefined;
}Props for DictionaryInput, a repeating input that edits a dictionary of schema-validated items.
{
one?: string;
many?: string;
min?: number | undefined;
max?: number | undefined;
items: Schema<T>;
}Props for TextInput, a single- or multi-line text input bound to a string value.
{
rows?: number | undefined;
multiline?: boolean;
input?: StringInputType;
min?: number | undefined;
max?: number | undefined;
formatter?: TextFormatter | undefined;
}Props for <Markup> — extends MarkupOptions so callers can override rules, rel, url, root, or schemes directly.
{
children?: string | undefined;
}A Meta object with a guaranteed url, plus derived path and params properties.
{
url: ImmutableURL;
root: ImmutableURL;
path: AbsolutePath;
params: URIParams;
}Props for <Loader> and <PageLoader> — the children to load plus an optional fallback shown while they suspend.
{
readonly fallback?: ReactNode | undefined;
}Props for a component that renders a caught error reason.
{
reason: unknown;
}Props for <Catcher> — the children to guard plus the as component used to render any caught error.
{
as: (props: ErrorProps) => ReactElement;
}Props for the Mapping component returned by createMapper().
{
readonly mapping: Mapping;
}Props for the Mapper component returned by createMapper().
{
readonly children?: Elements;
}Props for <Icon> — the status to represent and optional icon size.
{
icon?: ComponentType<{ className?: string | undefined }>;
size?: SizeVariant | undefined;
tint?: TintVariant | undefined;
}Styling variants accepted by <Tag> — status, colour, and typography options.
{}Props for <Tag> — TagVariants styling options plus <Clickable> props (href, onClick, children, etc.).
{}Props for a component that works as a route in the router.
URIParams
React component usable as a route value — a function or class component accepting RouteProps.
FunctionComponent<RouteProps> | ComponentClass<RouteProps>
Valid route values:
RouteComponent | AbsolutePath | ReactElement
Route table mapping { path: RouteComponent | redirectPath | ReactElement } for a <Router>.
{
[key: AbsolutePath]: Nullish<Route | false>;
}Callback invoked when a Form is submitted with its validated data.
( data: T, event: SubmitEvent<HTMLFormElement>, ) => ReactNode | void | PromiseLike<ReactNode | void>
Handler for a clickable onClick event.
(event: MouseEvent<HTMLButtonElement>) => ReactNode | void | PromiseLike<ReactNode | void>
Map of view-transition types to their CSS class names in { type: className } format.
{
default: string;
forward?: string;
back?: string;
}Known view-transition type names that all transitions support — the keys of TransitionClasses.
keyof TransitionClasses
Semantic element names a block element may render as via its as prop.
"div" | "section" | "header" | "footer" | "article" | "nav" | "aside" | "figure"
Props for Title — identical to HeadingProps.
HeadingProps
Props for Subheading — identical to HeadingProps.
HeadingProps
Set of named meta <meta /> tags in { name: content } format.
ImmutableDictionary<string | boolean | null | undefined>
Set of resolved meta <link /> tags in { rel: href } format (hrefs already absolutified to ImmutableURI).
ImmutableDictionary<ImmutableURI>
Set of input meta <link /> tags in { rel: href } format, before hrefs are resolved.
ImmutableDictionary<Nullish<PossibleLink>>
Set of resolved linked assets in (href)[] format (hrefs already absolutified to ImmutableURI).
ImmutableArray<ImmutableURI>
Set of input linked assets in (href)[] format, before hrefs are resolved.
ImmutableArray<Nullish<PossibleLink>>
Type for a meta Content-Security-Policy tag in { resource: string[] } format.
{
readonly [resource: string]: string[];
}Set of classnames that can be joined into a single className string.
string | null | undefined | readonly Classes[] | Variants
CSS modules mapping of local class names to hashed runtime class names.
ImmutableDictionary<string | undefined>
Callback that can return or throw a value, triggering a success or error notice accordingly.
(...args: A) => PromiseLike<ReactNode | undefined | void> | ReactNode | undefined | void
Allowed values for font size for components that support TypographyVariants
| "xxsmall" | "xsmall" | "small" | "normal" | "large" | "xlarge" | "xxlarge" | "xxxlarge" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x"
Allowed values for font weight for components that support TypographyVariants
"title" | "body" | "label" | "code" | "normal" | "strong"
Allowed values for text case for components that support TypographyVariants
"title" | "body" | "label" | "code" | "upper" | "lower" | "normal"
Allowed values for font family for components that support TypographyVariants
"title" | "body" | "label" | "code" | "serif" | "sans" | "monospace"
Enumerated drop-shadow scale selectable via the shadow="normal" variant prop.
"none" | "small" | "normal" | "large"
Enumerated width selectable via the width variant prop.
| "narrow" | "normal" | "wide" | "full" | "fit" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "10x" | "12x" | "16x" | "20x" | "24x" | "28x" | "32x"
Allowed values for border thickness for components that support StrokeVariants
"normal" | "thick"
Allowed values for inline-padding ("indent") for components that support IndentVariants
| "none" | "xxsmall" | "xsmall" | "small" | "normal" | "large" | "xlarge" | "xxlarge" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x"
Enumerated colour names selectable via the color="purple" prop for components that support that support ColorVariants
| "primary" | "secondary" | "tertiary" | "red" | "orange" | "yellow" | "green" | "aqua" | "blue" | "purple" | "pink" | "gray"
Allowed values for border radius for components that support RadiusVariants
"none" | "xxsmall" | "xsmall" | "small" | "normal" | "large" | "xlarge" | "xxlarge"
Allowed status names selected via the status="info" prop for components that support that support StatusVariants
"loading" | "info" | "danger" | "error" | "warning" | "success"
Allowed values for block spacing for components that support SpaceVariants
| "section" | "paragraph" | "none" | "xxsmall" | "xsmall" | "small" | "normal" | "large" | "xlarge" | "xxlarge" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x"
Shades of the currently selected tint color, from "00" (black) through "50" (the hue itself) to "100" (white).
| "00" | "05" | "10" | "15" | "20" | "25" | "30" | "35" | "40" | "45" | "50" | "55" | "60" | "65" | "70" | "75" | "80" | "85" | "90" | "95" | "100"
Allowed values for transition timing for components that support DurationVariants
"fast" | "normal" | "slow"
Children tuple for Popover: a leading trigger node followed by the popover's contents.
readonly [ /** * First child of the <Popover> is element that activates the popover. * - Should be a `<Button>` or `<Input>` that activates or provides the children. */ trigger: ReactNode, /** * Remaining children are the contents of the popover. */ ...popover: ReactNode[], ]
Dispatch table from a JSX.IntrinsicElements key to a renderer component.
{
[K in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[K]>;
}React context holding the current NavigationStore, provided by <Navigation>.
React context holding the current FormStore, provided by the Form component.
Shared loading <Notice> element showing the loading spinner.
Global NoticesStore shown by <Notices>, accepting any of the default statuses.
Context for providing a "retry" callback to descendant <RetryButton> elements.
Tuple of the status names selectable via the status variant prop.
STATUSES: ImmutableArray<Status>
CSS class that (re)calculates the full ladder of tint shades from the current global tint colour.
Markup rule that renders an inline code span as a tree-resolved <TreeLink> instead of a plain <code>.
TREE_CODE_RULE: MarkupRule
Default markup rules with the inline-code rule swapped for TREE_CODE_RULE — every backtick span auto-links to its documented token.
TREE_MARKUP_RULES: MarkupRules
React context holding a flattened key → element map of the surrounding tree(s).
Input that is loading.
Shared loading spinner element with a stable key, ready to drop into Suspense fallbacks and lists.
React context holding the current Meta object (page URL, site root, title, etc.).