Type alias TextFieldProps

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;
}

Type declaration

  • Optional className?: string

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

  • Optional defaultValue?: string | number

    Starting value for the text field if it is not controlled

  • Optional hasError?: boolean

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

    Default

    false
    
  • Optional helperText?: string

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

  • Optional id?: string

    Optional unique identifier

  • Optional isDisabled?: boolean

    If true, the component is disabled.

    Default

    false
    
  • Optional isFullWidth?: boolean

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

    Default

    false
    
  • Optional isRequired?: boolean

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

    Default

    false
    
  • Optional label?: string

    The title of the TextField

  • Optional onBlur?: FocusEventHandler<HTMLInputElement>

    Triggers when textfield loses focus

  • Optional onChange?: ChangeEventHandler<HTMLInputElement>

    Triggers when content of textfield is changed

  • Optional onFocus?: FocusEventHandler<HTMLInputElement>

    Triggers when textfield gets focus

  • Optional placeholder?: string

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

  • Optional value?: string | number

    Value of the text field if controlled