schema-components - v3.7.0
    Preparing search index...

    Interface BaseRenderProps<Output>

    Framework-agnostic base for the props passed to every render function. Extends BaseFieldProps with a renderChild callable whose return type is parameterised over Output — the type the framework adapter emits per field (typically unknown / ReactNode for React, string for HTML, framework-specific for future Vue / Solid / Svelte / Lit adapters).

    The base renderChild is declared with a ...args: never[] rest parameter so derived adapter interfaces can override it with a richer signature carrying extra required arguments (React's onChange, HTML's pathSuffix, etc.). The never[] rest makes the base callable signature the bottom of the function-subtype lattice: every adapter's concrete renderChild is assignable to it because never accepts any parameter type contravariantly. The base therefore documents the shared shape — "given a WalkedField and a value, produce an Output" — without preventing adapters from adding required parameters.

    interface BaseRenderProps<Output = unknown> {
        value: unknown;
        readOnly: boolean;
        writeOnly: boolean;
        meta: SchemaMeta;
        constraints: AllConstraints;
        path: string;
        examples?: unknown[];
        tree: WalkedField;
        renderChild: (...args: never[]) => Output;
    }

    Type Parameters

    • Output = unknown

      The type the framework adapter emits per field (e.g. ReactNode / unknown for React, string for HTML).

    Hierarchy (View Summary)

    Index

    Properties

    value: unknown

    Current field value.

    readOnly: boolean

    Whether to render as read-only display.

    writeOnly: boolean

    Whether to render as an empty input.

    Schema metadata for this field.

    constraints: AllConstraints

    Constraints from schema checks.

    path: string

    Dot-separated path from root (e.g. "address.city").

    examples?: unknown[]

    Example values from the schema's examples keyword.

    Walked field tree for recursive rendering.

    renderChild: (...args: never[]) => Output

    Render a child field. Theme adapters call this to recursively render nested structures (object fields, array elements, union options). Each adapter narrows the signature in its specialised variant (RenderProps, HtmlRenderProps, …) to match its native rendering primitives.