platform-bible-react
    Preparing search index...

    Type Alias TextFieldProps

    type TextFieldProps = {
        className?: string;
        defaultValue?: string | number;
        hasError?: boolean;
        helperText?: string;
        id?: string;
        isDisabled?: boolean;
        isFullWidth?: boolean;
        isRequired?: boolean;
        label?: string;
        onBlur?: FocusEventHandler<HTMLInputElement>;
        onChange?: ChangeEventHandler<HTMLInputElement>;
        onFocus?: FocusEventHandler<HTMLInputElement>;
        placeholder?: string;
        value?: string | number;
    }
    Index

    Properties

    className?: string

    Additional css classes to help with unique styling of the text field

    defaultValue?: string | number

    Starting value for the text field if it is not controlled

    hasError?: boolean

    If true, the label is displayed in an error state.

    false
    
    helperText?: string

    Text that gives the user instructions on what contents the TextField expects

    id?: string

    Optional unique identifier

    isDisabled?: boolean

    If true, the component is disabled.

    false
    
    isFullWidth?: boolean

    If true, the input will take up the full width of its container.

    false
    
    isRequired?: boolean

    If true, the label is displayed as required and the input element is required.

    false
    
    label?: string

    The title of the TextField

    onBlur?: FocusEventHandler<HTMLInputElement>

    Triggers when textfield loses focus

    onChange?: ChangeEventHandler<HTMLInputElement>

    Triggers when content of textfield is changed

    onFocus?: FocusEventHandler<HTMLInputElement>

    Triggers when textfield gets focus

    placeholder?: string

    The short hint displayed in the input before the user enters a value.

    value?: string | number

    Value of the text field if controlled