FormNoticecomponent
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
A 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(); spacing, padding, and gap from getSpaceClass(), getPaddingClass(), 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 its own theme hooks — a single tint hook (--card-tint) to recolour the whole component, plus per-property hooks (--card-background, --card-radius, …) for surgical overrides. Those 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 rather than overriding individual steps. See TINT_CLASS for the full theming guide, and each component's Styling section for its per-component 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/.
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
Composite input that edits a data object by rendering a SchemaInput for each property schema.
DataInput(props: DataInputProps<T>): ReactElement
Schema-driven form that creates a FormStore, provides it via FormContext, and validates/submits on submit.
Form(props: FormProps<T>): ReactElement
Dropdown input bound to a string value, rendered as a <select> of the provided options.
SelectInput(props: SelectProps<T>): ReactElement
Show a form footer with a submit button and the form's error message.
FormFooter({ children, submit }: FormFooterProps): ReactElementA <Field> wraps around a form control/input, to shows a small <label> above it.
Field({ title, description, message, half, children }: FieldProps): ReactElementRepeating input that edits an array of items, adding a SchemaInput row per item.
ArrayInput(props: ArrayInputProps<T>): ReactElement
Wraps an input with support for absolutely-positioned data-slot icon elements on either side.
InputWrapper({ children }: ChildProps): 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
Render either a <button>, an <a href="">, or a plain <span> based on whether an onClick or href prop is provided.
Clickable(props: StylableClickableProps): ReactElement
Repeating input that edits a dictionary, with an editable key and schema-validated value per entry.
DictionaryInput(props: DictionaryInputProps<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): ReactElementShow progress as a single continuous horizontal bar, filled to value clamped between 0 and 1.
Progress({ value, success, warning, danger }: ProgressProps): ReactElement | nullShow step progress as a horizontal bar of total segments, of which current + 1 are filled.
SegmentedProgress({ total, current, success, warning, danger }: SegmentedProgressProps): ReactElement | nullShow 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
Output a list of <RadioInput> elements for each item in a set of ChoiceOptions in { key: title } format.
ChoiceRadioInputs(props: ChoiceRadioInputsProps<T>): ReactElement
Show static read-only content styled as an input, falling back to placeholder when empty.
OutputInput({ title, placeholder, children = title, ...props }: OutputInputProps): ReactElementShow the current form's "main" (unnamed) message as a <Message>, or render nothing when there is no message.
FormMessage(props: Omit<MessageProps, "children">): ReactElement | null
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
Match the current URL against routes and render the matched element.
Router({ routes, fallback, ...meta }: RouterProps): ReactElement | nullTop-level navigation provider.
Navigation({ children, ...meta }: NavigationProps): ReactElementKeep-alive page cache keyed by the current URL — drop it into a layout around its scrolling content region.
RouteCache({ maxCached = 10, children }: RouteCacheProps): 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 documented symbol's @returns entries as a scrollable table — one row per return type.
DocumentationReturns({ returns }: DocumentationReturnsProps): ReactNodeRender a documented type's data members (properties, getters/setters) as a scrollable table — one row per property.
DocumentationProperties({ properties }: DocumentationPropertiesProps): ReactNodePage 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 parameters as a scrollable table — one row per parameter.
DocumentationParams({ params }: DocumentationParamsProps): ReactNodeColour-coded tag for a documented symbol's kind.
DocumentationKind({ kind = "unknown", ...props }: DocumentationKindProps): ReactElementRender a documentation table's Type column — one linked token per union member, each stacked on its own line.
DocumentationType({ members }: DocumentationTypeProps): ReactNodeRender a symbol's relational metadata as a <nav> column of labelled links.
DocumentationButtons({ wrap = true, left = true, gap = "none", ...props }: DocumentationButtonsProps): ReactElement | nullPage renderer for the documentation site's home page — a bold coloured hero panel over the module listing.
DocumentationHomePage({ title, name, description, content, children }: TreeElementProps): ReactNodeRender a documentation table row's description cell.
DocumentationDescription({ description, default: def, optional, readonly }: DocumentationDescriptionProps): ReactNodeRender a type alias's referenced type names as a scrollable table — one row per referenced type.
DocumentationReferences({ types }: DocumentationReferencesProps): ReactNodeRender a documented symbol's @throws entries as a scrollable table — one row per thrown type.
DocumentationThrows({ throws }: DocumentationThrowsProps): ReactNodeRender the global list of notices and subscribe to incoming "notice" events.
Notices(props: NoticesProps): ReactElement
Block-level status callout with an icon and message, used to highlight feedback.
Notice({
children, //
icon,
...props
}: NoticeProps): voidEmit the current page's head metadata and sync browser history to its URL.
Head(): ReactElement
Render the full <html> document shell wrapping <head> and <body>.
HTML({ children, ...meta }: HTMLProps): ReactElementWrap a single page (or screen) within an app, applying its meta and head tags.
Page({ children, ...meta }: PageProps): ReactElementLayout that centres its content with no header/footer and a narrow max-width.
CenteredLayout({ children, fullWidth = false }: CenteredLayoutProps): ReactElementLayout with a fixed-width side column (typically navigation) next to a scrollable main content column.
SidebarLayout({ sidebar, children, right = false }: SidebarLayoutProps): ReactElementProvide a tree to descendants as a flattened lookup map (see flattenTree()).
TreeProvider({ tree, children }: { readonly tree: TreeElement; readonly children: ReactNode }): ReactNodeRender a markup string with inline code spans auto-linked to their documented tree elements.
TreeMarkup({ rules = TREE_MARKUP_RULES, ...props }: MarkupProps): ReactNodeSidebar built from a tree element, in three sections separated by dividers.
TreeSidebar({ tree, path = "/" as AbsolutePath }: TreeSidebarProps): ReactNodePage renderer for a generic tree-element (a directory or file).
TreePage({ title, name, description, content, children }: TreeElementProps): ReactNodeSmall button linking to a specific tree element, resolved by reference string.
TreeButton({ name, children, small = true, plain = true, ...variants }: TreeButtonProps): ReactElementResolve a URL path to a tree element and render it as a full page.
TreeRouter({ tree, fallback, ...meta }: TreeRouterProps): ReactNodeTop-level app component for a tree-based documentation site.
TreeApp({ tree, routes: extraRoutes, ...meta }: TreeAppProps): ReactElementCard renderer for a generic tree-element (a directory or file) — a summary card showing the heading and description.
TreeCard({ path, name, title, description }: TreeElementProps): ReactNodeRender a list of tree elements as a stack of cards.
TreeCards({ children }: TreeCardsProps): ReactNodeInline Code token linking to a specific tree element, resolved by reference string — the link-styled counterpart of TreeButton.
TreeLink({ name, children, ...props }: TreeLinkProps): ReactElementDefault menu item renderer for any tree-* element.
TreeMenuItem({ path = "/", name, title, children }: TreeElementProps & TreeMenuExtras): ReactNodeSidebar navigation menu built from the children of a root tree element.
TreeMenu({ path = "/", tree }: TreeMenuProps): ReactNodeBreadcrumb trail of links to a tree page's ancestors, separated by › arrow icons.
TreeBreadcrumbs({ tint = "70", left = true, wrap = true, ...variants }: TreeBreadcrumbsProps): ReactElement | nullPage listing every element in the system in one flat, searchable view.
TreeIndexPage(): ReactNode
Table cell.
Cell({ header = false, children, ...props }: CellProps): ReactElementTable block — rendered as <table>.
Table({ children, ...props }: TableProps): ReactElementStyled <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
Transition that fades its children in and out by animating their opacity.
FadeTransition(props: FadeTransitionProps): ReactElement
Transition that slides its children horizontally — right when moving forward, left when moving back.
HorizontalTransition(props: HorizontalTransitionProps): ReactElement
Wrap children in a React View Transition, applying the configured transition classes.
Transition({
children,
default: d,
forward = d,
back = d,
...variants
}: Partial<TransitionClasses> & TransitionProps): 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
Root component for an application, providing the top-level Meta context and global styles.
App({ children, ...meta }: AppProps): ReactElementImage block — renders an <img> with space and width variants applied.
Image({ src, alt, ...variants }: ImageProps): ReactElementLabel heading, a <h3> with a labelly appearance (UPPERCASE but with a smaller text size).
Label({ level = "3", children, ...props }: LabelProps): ReactElementPreformatted block of text — rendered as <pre>.
Preformatted({ children, ...variants }: PreformattedProps): 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): ReactElementPage title — renders an <h1>.
Title({ level = "1", children, ...props }: TitleProps): ReactElementSection heading — renders an <h2>.
Heading({ level = "2", children, ...props }: HeadingProps): ReactElementVideo container element.
Video({ children, ...variants }: VideoProps): ReactElementIndividual video button over a video — renders a <button>.
VideoButton({ children, title, onClick, disabled, ...variants }: VideoButtonProps): ReactElementButton to toggle the surrounding video element in and out of fullscreen.
FullscreenVideoButton(): ReactElement | null
List block — wraps each child in an <li> and renders an <ul> or <ol>.
List({ children, ordered = false, ...props }: ListProps): ReactElementDescription list — a sequence of term/value pairs rendered as a <dl>.
Definitions({ children, ...props }: DefinitionsProps): ReactElementA section of longform text containing lots of <p> or <ul> style elements.
Prose({ children }: ProseProps): 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): ReactElementSubsection heading — renders an <h3>.
Subheading({ level = "3", children, ...props }: SubheadingProps): ReactElementParagraph block of body text — rendered as <p>.
Paragraph({ children, ...props }: ParagraphProps): ReactElementCards are boxed areas for content to sit within.
Card({ as: Element = "article", children, href, onClick, title = "Open", ...props }: CardProps): ReactElement<figcaption> block — caption text for a <Figure>.
Caption({ children, ...props }: CaptionProps): ReactElementPlain <div> block with block-level spacing.
Block({ as: Element = "div", children, ...props }: BlockProps): ReactElementQuoted block of text — rendered as <blockquote>.
Blockquote({ children, ...props }: BlockquoteProps): ReactElementButton that retries the nearest <Catcher> error boundary when clicked.
RetryButton({ children = RETRY_CHILDREN, ...props }: RetryButtonProps): ReactElement | nullReact error boundary that renders a fallback component when any descendant throws.
new Catcher()
Error boundary for a whole page that renders a full <ErrorPage> fallback on error.
PageCatcher({ children }: PageCatcherProps): ReactElementRender a caught error as an inline <Notice> with a retry button.
ErrorNotice({ reason }: ErrorNoticeProps): ReactElementRender a caught error as a full-page <Page> with an error <Card> and retry button.
ErrorPage({ reason }: ErrorPageProps): ReactElementRender the icon for a given status, coloured to match.
Icon(props: IconProps): ReactElement
Parse a markup string and render the resulting elements inline.
Markup({ children, ...options }: MarkupProps): ReactNodeAnimated spinner SVG used as a loading indicator.
Loading(): ReactElement
Small inline label used to annotate other content.
Tag(props: TagProps): ReactElement
Flex container that arranges its children as a row by default.
Row({ children, ...props }: RowProps): ReactElementFlex container that stacks its children as a column by default.
Column({ children, column = true, ...props }: ColumnProps): ReactElementWrap children in a scrollable container with horizontal and/or vertical scrolling enabled.
Scroll({ children, ...props }: ScrollComponentProps): ReactElementEmphasised text — renders an <em> element for stress emphasis (typically italic).
Emphasis({ children }: EmphasisProps): ReactElementInserted text — renders an <ins> element to mark content added to a document.
Inserted({ children }: InsertedProps): ReactElementDeleted text — renders a <del> element to mark content removed from a document.
Deleted({ children }: DeletedProps): ReactElementHighlighted text — renders a <mark> element to call attention to a run of text.
Mark({ children }: MarkProps): ReactElementInline code span — renders a <code> element.
Code({ children, plain, ...props }: CodeProps): ReactElementSuperscript text — renders a <sup> element for typographically raised text (e.g. exponents, footnote markers).
Superscript({ children }: SuperscriptProps): 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
Small print — renders a <small> element for side comments and fine print.
Small({ children }: SmallProps): ReactElementSubscript text — renders a <sub> element for typographically lowered text (e.g. chemical formulae).
Subscript({ children }: SubscriptProps): ReactElementInline link — delegates to <Clickable>, rendering an <a> (when href is set) or <button> (when onClick is set).
Link(props: LinkProps): ReactElement
Strong importance — renders a <strong> element for text of strong importance (typically bold).
Strong({ children }: StrongProps): ReactElementA <menu> list of <MenuItem> children.
Menu({ children }: MenuProps): ReactNodeA <li> containing an <a> link, plus optional submenu content shown when this item is "proud".
MenuItem({ href, children, ...props }: MenuItemProps): ReactNodeRun 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
Date, 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): ReactElementHook 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>Submit 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,
...variants
}: SubmitButtonProps): 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): ReactElementOutput a list of <RadioInput> elements for each item in an array.
ArrayRadioInputs({
value,
onValue,
required = false,
items,
formatter = formatValue,
...props
}: ArrayRadioInputsProps<T>): ReactElementCheckbox 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,
...variants
}: CheckboxProps): ReactElementAn input button that, when clicked, shows a popover next to it when clicked or focused.
ButtonInputPopover({
children: [buttonChildren, ...popoverChildren], //
...props
}: ButtonInputPopoverProps): ReactElementBuild the shared base className for a form input from its styling variants — the base input class plus any InputVariants.
getInputClass(props: InputVariants): string
Render 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): ReactElementWhether a schema is required, i.e. not wrapped in an OptionalSchema or NullableSchema.
isSchemaRequired(schema: Schema): boolean
Numeric 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): ReactElementPublish the current form's "main" (unnamed) message as a global success notice whenever it changes.
FormNotify(): void
Trigger element that reveals a floating popover panel beside it when active or focused.
Popover({
children: [trigger, ...popover], //
onClose,
open = popover.flat().some(isTruthy),
}: PopoverProps): ReactElementA button that, when clicked, shows a popover next to it when clicked or focused.
ButtonPopover({
children: [buttonChildren, ...popoverChildren], //
...props
}: ButtonPopoverProps): 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>): ReactElementFile picker input that emits the selected File through onValue.
FileInput({
name,
title,
placeholder = title,
required = false,
disabled = false,
message,
// value,
onValue,
types = {},
...variants
}: FileInputProps): ReactElementGet the full combined className string for a button from its styling variants.
getButtonClass(variants: ButtonVariants): string
Single <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,
...props
}: RadioInputProps): ReactElementRead the current NavigationStore from context, throwing if used outside <Navigation>.
requireNavigation(): NavigationStore
Get the raw colour variant for a documented symbol's kind, or undefined for an unknown kind.
getDocumentationKindColor(kind: string): ColorVariant | undefined
Split a type expression on | into its individual union members.
splitType(type: string): { readonly members: readonly string[]; readonly optional: boolean }Status-coloured paragraph used for inline feedback messages.
Message({ children, ...props }: MessageProps): voidTrack the dynamic viewport height so layout safe-area insets follow the on-screen keyboard.
useSafeKeyboardArea(): void
Use 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
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>
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
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 }): voidUse 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
Hold 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
Re-render a component automatically on a fixed interval.
useRefresh(interval: number): void
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
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
Read the current DialogsStore from the nearest <DialogsContext>.
requireDialogs(): DialogsStore
Type-safe passthrough for React's addTransitionType() that checks type is one of our known view-transition types.
setTransitionType(type: TransitionType): void
Horizontal rule separating blocks of content — rendered as <hr>.
Divider(props: DividerProps): void
Set of video buttons floating over a video.
VideoButtons({ children, ...variants }: VideoButtonsProps): voidGet the combined className string for a section from its styling variants.
getSectionClass(variants: SectionProps): string
Show any kind of contact data, rendered as an <address>.
Address({ children, ...props }: AddressProps): voidGet the combined className string for a paragraph from its styling variants.
getParagraphClass(variants: ParagraphProps): string
Get the combined className string for a block from its styling variants.
getBlockClass(variants: BlockProps): string
Create a [Mapping, Mapper] pair of components backed by their own private React context.
createMapper(defaults: Mapping<E> = {}): [Mapping: FunctionComponent<MappingProps<E>>, Mapper: FunctionComponent<MapperProps<E>>]Read 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
Build the combined className string for a <Tag> from its styling variants.
getTagClass(variants: TagVariants): void
Get the width class for a component from its width / grow variant props.
getWidthClass({ width, grow }: WidthVariants): string | undefinedGet the typography class for a component from its typographic variant props.
getTypographyClass({ tint, weight, font, case: caseValue, size, ...props }: TypographyVariants): string | undefinedGet the transition-duration class for a component from its duration variant prop.
getDurationClass({ duration }: DurationVariants): string | undefinedGet the gap class for a component from its gap variant prop.
getGapClass({ gap }: GapVariants): string | undefinedGet the flex layout class for a component from its flex variant props.
getFlexClass(variants: FlexVariants): string
Get the drop-shadow class for a component from its shadow variant prop.
getShadowClass({ shadow }: ShadowVariants): string | undefinedGet the scroll class for a component from its horizontal / vertical variant props.
getScrollClass({ horizontal, vertical }: ScrollVariants): stringCSS class that applies color tinting to an element.
getColorClass({ color }: ColorVariants): string | undefinedGet the status tint class for a component from its status variant prop.
getStatusClass({ status }: StatusVariants): string | undefinedGet the border-thickness class for a component from its stroke variant prop.
getStrokeClass({ stroke }: StrokeVariants): string | undefinedGet the corner-radius class for a component from its radius variant prop.
getRadiusClass({ radius }: RadiusVariants): string | undefinedGet the block-padding class for a component from its padding variant prop.
getPaddingClass({ padding }: PaddingVariants): string | undefinedGet the block spacing class for a component from its space="" variant prop.
getSpaceClass({ space }: SpaceVariants): string | undefinedReactive 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 the current navigation URL and driving browser history.
new NavigationStore(url: PossibleURL = typeof window === "undefined" ? "/" : window.location.href, base?: PossibleURL)
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>()
Store holding the live list of open <Dialog> elements.
new DialogsStore()
Props for DataInput, a composite input that edits an object of schema-validated sub-fields.
{
props: Schemas<T>;
}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 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 SelectInput, a dropdown <select> bound to a string value.
{
options: ChoiceOptions<T>;
}Props for FormFooter, the submit-button-and-message footer for a form.
{
submit?: ReactNode | undefined;
}Props for Field, a labelled wrapper around a form control.
{
title?: ReactNode | undefined;
description?: ReactNode | undefined;
message?: ReactNode | undefined;
required?: boolean | undefined;
half?: boolean | undefined;
}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 SubmitButton, a form submit button.
{}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 ArrayRadioInputs, which renders a radio for each item in an array of values.
{
items: ImmutableArray<T>;
formatter?: ((value: T) => ReactNode) | undefined;
}Props for CheckboxInput, a boolean-valued checkbox input.
{}Props for ButtonInputPopover, an input button that toggles an adjacent popover.
{
children: PopoverChildren;
}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 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;
}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 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 NumberInput, a text-based numeric input bound to a number value.
{
min?: number | undefined;
max?: number | undefined;
formatter?: NumberFormatter | undefined;
}Props for Progress, a continuous horizontal progress bar.
{
value: number;
success?: boolean;
warning?: boolean;
danger?: boolean;
}Props for SegmentedProgress, a stepped progress bar of discrete segments.
{
total: number;
current: number;
success?: boolean;
warning?: boolean;
danger?: boolean;
}Props for FormInput, a bare SchemaInput bound to a named form field.
{}Props for Popover, a trigger element that reveals floating content.
{
children: PopoverChildren;
onClose?: Callback;
open?: boolean;
}Props for ButtonPopover, a button that toggles an adjacent popover.
{
children: PopoverChildren;
}Props for ChoiceRadioInputs, which renders a radio for each entry in a ChoiceOptions set.
{
options: ChoiceOptions<T>;
wrap?: boolean;
column?: boolean;
}Props for OutputInput, a read-only <output> styled to match form inputs.
{}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 FileInput, an <input type="file"> that emits the selected File.
{
types?: FileTypes | 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;
}Props for RadioInput, a single labelled radio button styled as an input.
{}Props for <Router> — the routes to match against plus an optional fallback.
{
readonly routes: Routes;
readonly fallback?: ReactElement | undefined | null;
}Props for <Navigation> — initial Meta (url/base) plus optional children.
{}Props for <RouteCache> — the maxCached size and the content children to keep alive per URL.
{
readonly maxCached?: number | undefined;
readonly children: ReactNode;
}Props for DocumentationReturns — the @returns entries to render, one row each.
{
readonly returns?: ImmutableArray<DocumentationReturn> | undefined;
}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 DocumentationSignatures — the type signatures to render, one block per overload.
{
readonly signatures?: ImmutableArray<string> | undefined;
}Props for DocumentationParams — the parameter list to render, one row per parameter.
{
readonly params?: ImmutableArray<DocumentationParam> | undefined;
}Props for DocumentationKind — a TagProps plus the documented symbol's kind.
{
readonly kind: string;
}Props for DocumentationType — the union members to render (see splitType).
{
readonly members: readonly string[];
}Props for DocumentationButtons — the relational metadata of a documented symbol (class, extends, implements), plus block-space and flex overrides.
{}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 DocumentationReferences — the referenced type names to render, one row each.
{
readonly types?: ImmutableArray<string> | undefined;
}Props for DocumentationThrows — the @throws entries to render, one row each.
{
readonly throws?: ImmutableArray<DocumentationThrow> | undefined;
}Props for <Notices> — flex styling variants for the notices container.
{}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 <HTML> — initial Meta (language/root/app) plus the page children.
{}Props for <Page> — per-page Meta (title, description, etc.) plus the page children.
{}Props for <CenteredLayout> — optional children and a fullWidth flag to drop the max-width.
{
fullWidth?: boolean;
}Props for <SidebarLayout> — the sidebar column content, main children, and a right placement flag.
{
sidebar: ReactNode;
right?: boolean | undefined;
}Props for the TreeSidebar component — the root tree element plus its URL path.
{
readonly tree: TreeElement;
readonly path?: AbsolutePath | undefined;
}Props for the TreeButton component — the element reference plus button variants.
{
readonly name: string;
readonly children?: ReactNode | undefined;
}Props for the TreeRouter component — the tree to route plus an optional fallback and app meta.
{
readonly tree: TreeElement;
readonly fallback?: ReactElement | undefined | null;
}Props for the TreeApp component — the tree to render plus optional extra routes and app meta.
{
tree: TreeElement;
routes?: Routes | undefined;
}Props for the TreeCards component — the tree elements to render as cards.
{
readonly children?: TreeElements;
}Props for the TreeLink component — the element reference plus an optional label.
{
readonly name: string;
}Props for the TreeMenu component — the root tree element plus its URL path.
{
readonly tree: TreeElement;
readonly path?: AbsolutePath | undefined;
}Props for the TreeBreadcrumbs component — typography, space, and flex variant props.
{}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;
}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 Cell — width and typography variants plus children.
{
header?: boolean | undefined;
}Props for Table — colour, space, typography, and width variants plus children.
{}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 the FadeTransition component — the shared transition variant props.
{}Props for the HorizontalTransition component — the shared transition variant props.
{}Variant props shared by every transition component.
{
overlay?: boolean | undefined;
}Props for the VerticalTransition component — the shared transition variant props.
{}Props for the CollapseTransition component — the shared transition variant props.
{}Props for <App> — the root Meta plus the application children.
{}Props for Image — an src, optional alt text, plus space and width variants.
{
src: string;
alt?: string;
}Props for Label — identical to SubheadingProps.
{}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 Panel — colour, status, and typography variants plus optional children.
{
as?: BlockElement | undefined;
}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 Video — space and width variants plus optional children.
{}Props for VideoButtons — children plus an optional left alignment flag.
{
left?: boolean;
}Props for VideoButton — children plus optional title, onClick, danger, and disabled.
{
title?: string | undefined;
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
danger?: boolean;
disabled?: boolean;
}Props for FullscreenVideoButton — an empty marker interface (the component takes no props).
{
readonly [_fullscreenVideoButtonProps]?: never;
}Props for List — colour, gap, space, and typography variants plus its list items and an ordered toggle.
{
children: ReactNode[];
ordered?: boolean;
}Props for Definitions — colour, gap, space, and typography variants plus optional children.
{}Props for Prose — just the longform children to style.
{}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 Paragraph — colour, space, and typography variants.
{}Props for Card — combines ClickableProps (for navigable cards) with colour, status, padding, space, typography, and width variants.
{
as?: BlockElement | undefined;
}Props for Caption — colour, space, and typography variants plus optional children.
{}Props for Block — colour, space, typography, and width variants plus an optional as element override.
{
as?: BlockElement | undefined;
}Props for Blockquote — colour, space, and typography variants plus optional children.
{}Props for the Mapping component returned by createMapper().
{
readonly mapping: Mapping<E>;
}Props for <RetryButton> — <Button> variants plus optional children to override the default "Retry" label.
{}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: ErrorComponentProps) => ReactElement;
}Props for <PageCatcher> — the page children to guard.
{}Props for <ErrorNotice> — the caught error reason.
{}Props for <ErrorPage> — the caught error reason.
{}Props for <StatusIcon> — the status to represent and optional icon size.
{
icon?: ComponentType<{ className?: string | undefined }>;
size?: SizeVariant;
}Props for <Markup> — extends MarkupOptions so callers can override rules, rel, url, root, or schemes directly.
{
children?: string | undefined;
}Props for <Loading> — takes no props (branded empty interface).
{
readonly [_componentProps]?: never;
}A Meta object with a guaranteed url, plus derived path and params properties.
{
url: ImmutableURL;
path: AbsolutePath;
params: URIParams;
}Styling variants accepted by <Tag> — status, colour, and typography options.
{}Props for <Tag> — TagVariants styling options plus <Clickable> props (href, onClick, children, etc.).
{}Variant props that set (or unconstrain) a component's width, e.g. width="narrow" or width="12x".
{
width?: WidthVariant | undefined;
grow?: boolean | undefined;
}Typographic variant props — 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 transition duration of an element, e.g. duration="fast".
{
duration?: DurationValue | undefined;
}Variant props for the gap between a component's children, e.g. gap="large".
{
gap?: GapValue | 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;
}Props for the Row component — flex variants plus optional children.
{}Props for the Column component — flex variants plus optional children.
{}Variant props for the drop shadow of an element, e.g. shadow="large".
{
shadow?: ShadowVariant | 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 colouring an element, e.g. color="purple".
{
color?: ColorVariant | undefined;
}Variant props for the semantic status of an element, e.g. status="success".
{
status?: Status | undefined;
}Variant props for the border thickness of a component, e.g. stroke="thick".
{
stroke?: StrokeVariant | undefined;
}Variant props for the corner radius of an element, e.g. radius="large".
{
radius?: RadiusVariant | undefined;
}Variant props for the block-padding (top + bottom) of a component, e.g. padding="large".
{
padding?: PaddingVariant | undefined;
}Variants to control block spacing on components, e.g. space="large".
{
space?: SpaceValue | undefined;
}Props for Emphasis — optional children.
{}Props for Inserted — optional children.
{}Props for Deleted — optional children.
{}Props for Mark — optional children.
{}Props for Code — colour and typography variants, optional children, plus a plain toggle.
{
plain?: boolean | undefined;
}Props for Superscript — 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 Small — optional children.
{}Props for Subscript — optional children.
{}Props for Link — identical to ClickableProps (href for navigation or onClick for actions).
{}Props for Strong — optional children.
{}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 | [ReactNode, ...ReactNode[]];
}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>
Children tuple for Popover: a leading trigger node followed by the popover's contents.
[ /** * 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[], ]
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 that can return or throw a value, triggering a success or error notice accordingly.
(...args: A) => PromiseLike<ReactNode | undefined | void> | ReactNode | undefined | void
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>
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[];
}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
Props for Title — identical to HeadingProps.
HeadingProps
Props for Subheading — identical to HeadingProps.
HeadingProps
Semantic element names a block element may render as via its as prop.
"div" | "section" | "header" | "footer" | "article" | "nav" | "aside" | "figure"
Dispatch table from a JSX.IntrinsicElements key to a renderer component.
{
[K in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[K] & E>;
}Props for the Mapper component returned by createMapper().
E & {
readonly children?: Elements;
}Enumerated width selectable via the width variant prop.
"xxnarrow" | "xnarrow" | "narrow" | "normal" | "wide" | "xwide" | "xxwide" | "full" | "fit"
Allowed values for font size for components that support TypographyVariants
"xxsmall" | "xsmall" | "small" | "normal" | "large" | "xlarge" | "xxlarge"
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"
Allowed values for transition timing for components that support DurationVariants
"fast" | "normal" | "slow"
Allowed values for gap spacing for components that support GapVariants
"none" | "xxsmall" | "xsmall" | "small" | "normal" | "large" | "xlarge" | "xxlarge"
Enumerated drop-shadow scale selectable via the shadow="normal" variant prop.
"none" | "xxsmall" | "xsmall" | "small" | "normal" | "large" | "xlarge" | "xxlarge"
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 status names selected via the status="info" prop for components that support that support StatusVariants
"loading" | "info" | "danger" | "error" | "warning" | "success"
Allowed values for border thickness for components that support StrokeVariants
"normal" | "thick"
Allowed values for border radius for components that support RadiusVariants
"none" | "xxsmall" | "xsmall" | "small" | "normal" | "large" | "xlarge" | "xxlarge"
Allowed values for padding for components that support PaddingVariants
| "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 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"
React context holding the current FormStore, provided by the Form component.
Input that is loading.
React context holding the current NavigationStore, provided by <Navigation>.
Shared loading <Notice> element showing the loading spinner.
Shared loading <Message> element containing the <Loading> spinner.
Global NoticesStore shown by <Notices>, accepting any of the default statuses.
React context holding a flattened key → element map of the surrounding tree(s).
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
Canonical URL path of the TreeIndexPage, wired as a <TreeApp> fallback route.
Shared <Loading> 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.).
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.