psytask - v1.1.1
    Preparing search index...

    Type Alias BaseFieldProps<T>

    Base properties for all form field components

    type BaseFieldProps<T extends Primitive = string> = {
        id: string;
        label?: string | HTMLElement;
        required?: boolean;
        defaultValue?: T;
        validate?(value: T): string | true;
        setup?(root: HTMLDivElement): void;
    }

    Type Parameters

    • T extends Primitive = string

      The type of value this field handles

    Index

    Properties

    id: string

    Unique identifier for the form field

    label?: string | HTMLElement

    Label text or HTML element to display.

    id
    
    required?: boolean

    Whether the field is required for form submission.

    true
    
    defaultValue?: T

    Initial value for the field

    Methods