Hex Core JS
    Preparing search index...

    Type Alias TextFieldProps<FV>

    TextFieldProps: FieldProps<FV, TextFieldValue> & {
        allowLeadingWhitespace?: boolean;
        allowTrailingWhitespace?: boolean;
        cleanRawInput?: (value: string) => string;
        format?: FieldFormatFunction<TextFieldValue>;
        Input?: (props: TextFieldInputProps) => JSX.Element | null;
        inputFormat?: (value: TextFieldValue) => string;
        inputMode?: InputMode;
        maxLength?: number;
        minLength?: number;
        minRows?: number;
        multiLine?: boolean;
        placeholder?: string;
    } & Partial<ClassNameProps & StyleProps>

    Type Parameters

    Type Declaration

    • OptionalallowLeadingWhitespace?: boolean

      Indicates whether the value can have leading whitespace. If not enabled, leading whitespace is trimmed on blur.

    • OptionalallowTrailingWhitespace?: boolean

      Indicates whether the value can have trailing whitespace. If not enabled, trailing whitespace is trimmed on blur.

    • OptionalcleanRawInput?: (value: string) => string

      A function to transform values input by the user before they are set as the value or shown in the input. Useful, for example, for restricting the allowed characters or controlling capitalization.

    • Optionalformat?: FieldFormatFunction<TextFieldValue>

      Format function for the value. Controls how the value should be formatted when displayed in smaller contexts where only strings are allowed.

    • OptionalInput?: (props: TextFieldInputProps) => JSX.Element | null

      The input component to use when editing.

    • OptionalinputFormat?: (value: TextFieldValue) => string

      A function to format the value in the input into a standardized format. Only updates the value in the input on mount and blur of the input. Not to be confused with format, which is used when the field is in display mode.

    • OptionalinputMode?: InputMode

      Hints at the type of data that might be entered by the user while editing the element or its contents.

    • OptionalmaxLength?: number

      Maximum length for values (validation).

    • OptionalminLength?: number

      Minimum length for values (validation).

    • OptionalminRows?: number

      Minimum number of rows for multiline input.

    • OptionalmultiLine?: boolean

      Indicates whether the input should allow multiple lines (<textarea>) or only a single line (<input>).

    • Optionalplaceholder?: string

      Placeholder text to display in the input when the value is blank.