Libraries
    Preparing search index...

    Type Alias FieldRenderProps

    Props passed to a field renderer.

    type FieldRenderProps = {
        dirty: boolean;
        error: string | undefined;
        fieldProps?: Record<string, unknown>;
        initialValue: any;
        label?: string;
        name?: string;
        onBlur: () => void;
        onChange: (value: any) => void;
        schema: SchemaBuilder<any, any, any>;
        setValue: (value: any) => void;
        touched: boolean;
        validating: boolean;
        value: any;
        variant?: string;
    }
    Index

    Properties

    dirty: boolean
    error: string | undefined
    fieldProps?: Record<string, unknown>

    Bag of extra renderer-specific props forwarded from the Field component. Useful for passing HTML attributes (placeholder, autoComplete, type) or UI-library-specific options without extending FieldRenderProps itself.

    <Field
    forProperty={(t) => t.email}
    form={form}
    fieldProps={{ placeholder: "you@example.com", autoComplete: "email" }}
    />
    initialValue: any
    label?: string

    Visible label text forwarded from the Field component. Renderers can use this to render a <label> element.

    <Field forProperty={(t) => t.name} form={form} label="Full name" />
    
    name?: string

    HTML name attribute forwarded from the Field component. Renderers can apply this to the underlying input for FormData submission.

    <Field forProperty={(t) => t.email} form={form} name="email" />
    
    onBlur: () => void
    onChange: (value: any) => void
    schema: SchemaBuilder<any, any, any>
    setValue: (value: any) => void
    touched: boolean
    validating: boolean
    value: any
    variant?: string

    Rendering variant hint passed from the Field component. Used by renderers to select a sub-variant of the base schema type (e.g. "password" for a string field rendered as a password input).

    Also participates in renderer resolution: when set, the renderer registry is first checked for "type:variant" (e.g. "string:password") before falling back to the base "type" key.

    <Field forProperty={(t) => t.secret} form={form} variant="password" />