Backstage
    Preparing search index...

    Interface TextFieldProps

    interface TextFieldProps {
        "aria-activedescendant"?: string;
        "aria-autocomplete"?: "none" | "inline" | "list" | "both";
        "aria-controls"?: string;
        "aria-describedby"?: string;
        "aria-details"?: string;
        "aria-errormessage"?: string;
        "aria-haspopup"?:
            | boolean
            | "dialog"
            | "menu"
            | "true"
            | "false"
            | "listbox"
            | "tree"
            | "grid";
        "aria-label"?: string;
        "aria-labelledby"?: string;
        autoComplete?: string;
        autoCorrect?: string;
        autoFocus?: boolean;
        children?: ChildrenOrFunction<TextFieldRenderProps>;
        className?: ClassNameOrFunction<TextFieldRenderProps>;
        defaultValue?: string;
        description?: string | null;
        dir?: string;
        enterKeyHint?:
            | "search"
            | "enter"
            | "done"
            | "go"
            | "next"
            | "previous"
            | "send";
        excludeFromTabOrder?: boolean;
        form?: string;
        hidden?: boolean;
        icon?: ReactNode;
        id?: string;
        inert?: boolean;
        inputMode?: | "none"
        | "search"
        | "text"
        | "tel"
        | "url"
        | "email"
        | "numeric"
        | "decimal";
        isDisabled?: boolean;
        isInvalid?: boolean;
        isReadOnly?: boolean;
        isRequired?: boolean;
        label?: string
        | null;
        lang?: string;
        maxLength?: number;
        minLength?: number;
        name?: string;
        onAnimationEnd?: AnimationEventHandler<HTMLDivElement>;
        onAnimationEndCapture?: AnimationEventHandler<HTMLDivElement>;
        onAnimationIteration?: AnimationEventHandler<HTMLDivElement>;
        onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement>;
        onAnimationStart?: AnimationEventHandler<HTMLDivElement>;
        onAnimationStartCapture?: AnimationEventHandler<HTMLDivElement>;
        onAuxClick?: MouseEventHandler<HTMLDivElement>;
        onAuxClickCapture?: MouseEventHandler<HTMLDivElement>;
        onBeforeInput?: FormEventHandler<HTMLInputElement>;
        onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
        onChange?: (value: string) => void;
        onClick?: MouseEventHandler<HTMLDivElement>;
        onClickCapture?: MouseEventHandler<HTMLDivElement>;
        onCompositionEnd?: CompositionEventHandler<HTMLInputElement>;
        onCompositionStart?: CompositionEventHandler<HTMLInputElement>;
        onCompositionUpdate?: CompositionEventHandler<HTMLInputElement>;
        onContextMenu?: MouseEventHandler<HTMLDivElement>;
        onContextMenuCapture?: MouseEventHandler<HTMLDivElement>;
        onCopy?: ClipboardEventHandler<HTMLInputElement>;
        onCut?: ClipboardEventHandler<HTMLInputElement>;
        onDoubleClick?: MouseEventHandler<HTMLDivElement>;
        onDoubleClickCapture?: MouseEventHandler<HTMLDivElement>;
        onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
        onFocusChange?: (isFocused: boolean) => void;
        onGotPointerCapture?: PointerEventHandler<HTMLDivElement>;
        onGotPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>;
        onInput?: FormEventHandler<HTMLInputElement>;
        onKeyDown?: (e: KeyboardEvent) => void;
        onKeyUp?: (e: KeyboardEvent) => void;
        onLostPointerCapture?: PointerEventHandler<HTMLDivElement>;
        onLostPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>;
        onMouseDown?: MouseEventHandler<HTMLDivElement>;
        onMouseDownCapture?: MouseEventHandler<HTMLDivElement>;
        onMouseEnter?: MouseEventHandler<HTMLDivElement>;
        onMouseLeave?: MouseEventHandler<HTMLDivElement>;
        onMouseMove?: MouseEventHandler<HTMLDivElement>;
        onMouseMoveCapture?: MouseEventHandler<HTMLDivElement>;
        onMouseOut?: MouseEventHandler<HTMLDivElement>;
        onMouseOutCapture?: MouseEventHandler<HTMLDivElement>;
        onMouseOver?: MouseEventHandler<HTMLDivElement>;
        onMouseOverCapture?: MouseEventHandler<HTMLDivElement>;
        onMouseUp?: MouseEventHandler<HTMLDivElement>;
        onMouseUpCapture?: MouseEventHandler<HTMLDivElement>;
        onPaste?: ClipboardEventHandler<HTMLInputElement>;
        onPointerCancel?: PointerEventHandler<HTMLDivElement>;
        onPointerCancelCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerDown?: PointerEventHandler<HTMLDivElement>;
        onPointerDownCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerEnter?: PointerEventHandler<HTMLDivElement>;
        onPointerLeave?: PointerEventHandler<HTMLDivElement>;
        onPointerMove?: PointerEventHandler<HTMLDivElement>;
        onPointerMoveCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerOut?: PointerEventHandler<HTMLDivElement>;
        onPointerOutCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerOver?: PointerEventHandler<HTMLDivElement>;
        onPointerOverCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerUp?: PointerEventHandler<HTMLDivElement>;
        onPointerUpCapture?: PointerEventHandler<HTMLDivElement>;
        onScroll?: UIEventHandler<HTMLDivElement>;
        onScrollCapture?: UIEventHandler<HTMLDivElement>;
        onSelect?: ReactEventHandler<HTMLInputElement>;
        onTouchCancel?: TouchEventHandler<HTMLDivElement>;
        onTouchCancelCapture?: TouchEventHandler<HTMLDivElement>;
        onTouchEnd?: TouchEventHandler<HTMLDivElement>;
        onTouchEndCapture?: TouchEventHandler<HTMLDivElement>;
        onTouchMove?: TouchEventHandler<HTMLDivElement>;
        onTouchMoveCapture?: TouchEventHandler<HTMLDivElement>;
        onTouchStart?: TouchEventHandler<HTMLDivElement>;
        onTouchStartCapture?: TouchEventHandler<HTMLDivElement>;
        onTransitionCancel?: TransitionEventHandler<HTMLDivElement>;
        onTransitionCancelCapture?: TransitionEventHandler<HTMLDivElement>;
        onTransitionEnd?: TransitionEventHandler<HTMLDivElement>;
        onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement>;
        onTransitionRun?: TransitionEventHandler<HTMLDivElement>;
        onTransitionRunCapture?: TransitionEventHandler<HTMLDivElement>;
        onTransitionStart?: TransitionEventHandler<HTMLDivElement>;
        onTransitionStartCapture?: TransitionEventHandler<HTMLDivElement>;
        onWheel?: WheelEventHandler<HTMLDivElement>;
        onWheelCapture?: WheelEventHandler<HTMLDivElement>;
        pattern?: string;
        placeholder?: string;
        secondaryLabel?: string | null;
        size?: "small" | "medium" | Partial<Record<Breakpoint, "small" | "medium">>;
        slot?: string | null;
        spellCheck?: string;
        style?: StyleOrFunction<TextFieldRenderProps>;
        translate?: "yes" | "no";
        type?: "text" | "tel" | "url" | "email";
        validate?: (value: string) => true | ValidationError | null | undefined;
        validationBehavior?: "native" | "aria";
        value?: string;
    }

    Hierarchy

    • TextFieldProps
    • Omit<FieldLabelProps, "htmlFor" | "id" | "className">
      • TextFieldProps
    Index

    Properties

    aria-activedescendant? aria-autocomplete? aria-controls? aria-describedby? aria-details? aria-errormessage? aria-haspopup? aria-label? aria-labelledby? autoComplete? autoCorrect? autoFocus? children? className? defaultValue? description? dir? enterKeyHint? excludeFromTabOrder? form? hidden? icon? id? inert? inputMode? isDisabled? isInvalid? isReadOnly? isRequired? label? lang? maxLength? minLength? name? onAnimationEnd? onAnimationEndCapture? onAnimationIteration? onAnimationIterationCapture? onAnimationStart? onAnimationStartCapture? onAuxClick? onAuxClickCapture? onBeforeInput? onBlur? onChange? onClick? onClickCapture? onCompositionEnd? onCompositionStart? onCompositionUpdate? onContextMenu? onContextMenuCapture? onCopy? onCut? onDoubleClick? onDoubleClickCapture? onFocus? onFocusChange? onGotPointerCapture? onGotPointerCaptureCapture? onInput? onKeyDown? onKeyUp? onLostPointerCapture? onLostPointerCaptureCapture? onMouseDown? onMouseDownCapture? onMouseEnter? onMouseLeave? onMouseMove? onMouseMoveCapture? onMouseOut? onMouseOutCapture? onMouseOver? onMouseOverCapture? onMouseUp? onMouseUpCapture? onPaste? onPointerCancel? onPointerCancelCapture? onPointerDown? onPointerDownCapture? onPointerEnter? onPointerLeave? onPointerMove? onPointerMoveCapture? onPointerOut? onPointerOutCapture? onPointerOver? onPointerOverCapture? onPointerUp? onPointerUpCapture? onScroll? onScrollCapture? onSelect? onTouchCancel? onTouchCancelCapture? onTouchEnd? onTouchEndCapture? onTouchMove? onTouchMoveCapture? onTouchStart? onTouchStartCapture? onTransitionCancel? onTransitionCancelCapture? onTransitionEnd? onTransitionEndCapture? onTransitionRun? onTransitionRunCapture? onTransitionStart? onTransitionStartCapture? onWheel? onWheelCapture? pattern? placeholder? secondaryLabel? size? slot? spellCheck? style? translate? type? validate? validationBehavior? value?

    Properties

    "aria-activedescendant"?: string

    Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.

    "aria-autocomplete"?: "none" | "inline" | "list" | "both"

    Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.

    "aria-controls"?: string

    Identifies the element (or elements) whose contents or presence are controlled by the current element.

    "aria-describedby"?: string

    Identifies the element (or elements) that describes the object.

    "aria-details"?: string

    Identifies the element (or elements) that provide a detailed, extended description for the object.

    "aria-errormessage"?: string

    Identifies the element that provides an error message for the object.

    "aria-haspopup"?:
        | boolean
        | "dialog"
        | "menu"
        | "true"
        | "false"
        | "listbox"
        | "tree"
        | "grid"

    Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.

    "aria-label"?: string

    Defines a string value that labels the current element.

    "aria-labelledby"?: string

    Identifies the element (or elements) that labels the current element.

    autoComplete?: string

    Describes the type of autocomplete functionality the input should provide if any. See MDN.

    autoCorrect?: string

    An attribute that takes as its value a space-separated string that describes what, if any, type of autocomplete functionality the input should provide. See MDN.

    autoFocus?: boolean

    Whether the element should receive focus on render.

    children?: ChildrenOrFunction<TextFieldRenderProps>

    The children of the component. A function may be provided to alter the children based on component state.

    className?: ClassNameOrFunction<TextFieldRenderProps>

    The CSS className for the element. A function may be provided to compute the class based on component state.

    defaultValue?: string

    The default value (uncontrolled).

    description?: string | null

    The description of the text field

    dir?: string
    enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send"

    An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See MDN.

    excludeFromTabOrder?: boolean

    Whether to exclude the element from the sequential tab order. If true, the element will not be focusable via the keyboard by tabbing. This should be avoided except in rare scenarios where an alternative means of accessing the element or its functionality via the keyboard is available.

    form?: string

    The <form> element to associate the input with. The value of this attribute must be the id of a <form> in the same document. See MDN.

    hidden?: boolean
    icon?: ReactNode

    An icon to render before the input

    id?: string

    The element's unique identifier. See MDN.

    inert?: boolean
    inputMode?:
        | "none"
        | "search"
        | "text"
        | "tel"
        | "url"
        | "email"
        | "numeric"
        | "decimal"

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

    isDisabled?: boolean

    Whether the input is disabled.

    isInvalid?: boolean

    Whether the value is invalid.

    isReadOnly?: boolean

    Whether the input can be selected but not changed by the user.

    isRequired?: boolean

    Whether user input is required on the input before form submission.

    label?: string | null

    The label of the text field

    lang?: string
    maxLength?: number

    The maximum number of characters supported by the input. See MDN.

    minLength?: number

    The minimum number of characters required by the input. See MDN.

    name?: string

    The name of the input element, used when submitting an HTML form. See MDN.

    onAnimationEnd?: AnimationEventHandler<HTMLDivElement>
    onAnimationEndCapture?: AnimationEventHandler<HTMLDivElement>
    onAnimationIteration?: AnimationEventHandler<HTMLDivElement>
    onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement>
    onAnimationStart?: AnimationEventHandler<HTMLDivElement>
    onAnimationStartCapture?: AnimationEventHandler<HTMLDivElement>
    onAuxClick?: MouseEventHandler<HTMLDivElement>
    onAuxClickCapture?: MouseEventHandler<HTMLDivElement>
    onBeforeInput?: FormEventHandler<HTMLInputElement>

    Handler that is called when the input value is about to be modified. See MDN.

    onBlur?: (e: FocusEvent<HTMLInputElement>) => void

    Handler that is called when the element loses focus.

    onChange?: (value: string) => void

    Handler that is called when the value changes.

    onClick?: MouseEventHandler<HTMLDivElement>
    onClickCapture?: MouseEventHandler<HTMLDivElement>
    onCompositionEnd?: CompositionEventHandler<HTMLInputElement>

    Handler that is called when a text composition system completes or cancels the current text composition session. See MDN.

    onCompositionStart?: CompositionEventHandler<HTMLInputElement>

    Handler that is called when a text composition system starts a new text composition session. See MDN.

    onCompositionUpdate?: CompositionEventHandler<HTMLInputElement>

    Handler that is called when a new character is received in the current text composition session. See MDN.

    onContextMenu?: MouseEventHandler<HTMLDivElement>
    onContextMenuCapture?: MouseEventHandler<HTMLDivElement>
    onCopy?: ClipboardEventHandler<HTMLInputElement>

    Handler that is called when the user copies text. See MDN.

    onCut?: ClipboardEventHandler<HTMLInputElement>

    Handler that is called when the user cuts text. See MDN.

    onDoubleClick?: MouseEventHandler<HTMLDivElement>
    onDoubleClickCapture?: MouseEventHandler<HTMLDivElement>
    onFocus?: (e: FocusEvent<HTMLInputElement>) => void

    Handler that is called when the element receives focus.

    onFocusChange?: (isFocused: boolean) => void

    Handler that is called when the element's focus status changes.

    onGotPointerCapture?: PointerEventHandler<HTMLDivElement>
    onGotPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>
    onInput?: FormEventHandler<HTMLInputElement>

    Handler that is called when the input value is modified. See MDN.

    onKeyDown?: (e: KeyboardEvent) => void

    Handler that is called when a key is pressed.

    onKeyUp?: (e: KeyboardEvent) => void

    Handler that is called when a key is released.

    onLostPointerCapture?: PointerEventHandler<HTMLDivElement>
    onLostPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>
    onMouseDown?: MouseEventHandler<HTMLDivElement>
    onMouseDownCapture?: MouseEventHandler<HTMLDivElement>
    onMouseEnter?: MouseEventHandler<HTMLDivElement>
    onMouseLeave?: MouseEventHandler<HTMLDivElement>
    onMouseMove?: MouseEventHandler<HTMLDivElement>
    onMouseMoveCapture?: MouseEventHandler<HTMLDivElement>
    onMouseOut?: MouseEventHandler<HTMLDivElement>
    onMouseOutCapture?: MouseEventHandler<HTMLDivElement>
    onMouseOver?: MouseEventHandler<HTMLDivElement>
    onMouseOverCapture?: MouseEventHandler<HTMLDivElement>
    onMouseUp?: MouseEventHandler<HTMLDivElement>
    onMouseUpCapture?: MouseEventHandler<HTMLDivElement>
    onPaste?: ClipboardEventHandler<HTMLInputElement>

    Handler that is called when the user pastes text. See MDN.

    onPointerCancel?: PointerEventHandler<HTMLDivElement>
    onPointerCancelCapture?: PointerEventHandler<HTMLDivElement>
    onPointerDown?: PointerEventHandler<HTMLDivElement>
    onPointerDownCapture?: PointerEventHandler<HTMLDivElement>
    onPointerEnter?: PointerEventHandler<HTMLDivElement>
    onPointerLeave?: PointerEventHandler<HTMLDivElement>
    onPointerMove?: PointerEventHandler<HTMLDivElement>
    onPointerMoveCapture?: PointerEventHandler<HTMLDivElement>
    onPointerOut?: PointerEventHandler<HTMLDivElement>
    onPointerOutCapture?: PointerEventHandler<HTMLDivElement>
    onPointerOver?: PointerEventHandler<HTMLDivElement>
    onPointerOverCapture?: PointerEventHandler<HTMLDivElement>
    onPointerUp?: PointerEventHandler<HTMLDivElement>
    onPointerUpCapture?: PointerEventHandler<HTMLDivElement>
    onScroll?: UIEventHandler<HTMLDivElement>
    onScrollCapture?: UIEventHandler<HTMLDivElement>
    onSelect?: ReactEventHandler<HTMLInputElement>

    Handler that is called when text in the input is selected. See MDN.

    onTouchCancel?: TouchEventHandler<HTMLDivElement>
    onTouchCancelCapture?: TouchEventHandler<HTMLDivElement>
    onTouchEnd?: TouchEventHandler<HTMLDivElement>
    onTouchEndCapture?: TouchEventHandler<HTMLDivElement>
    onTouchMove?: TouchEventHandler<HTMLDivElement>
    onTouchMoveCapture?: TouchEventHandler<HTMLDivElement>
    onTouchStart?: TouchEventHandler<HTMLDivElement>
    onTouchStartCapture?: TouchEventHandler<HTMLDivElement>
    onTransitionCancel?: TransitionEventHandler<HTMLDivElement>
    onTransitionCancelCapture?: TransitionEventHandler<HTMLDivElement>
    onTransitionEnd?: TransitionEventHandler<HTMLDivElement>
    onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement>
    onTransitionRun?: TransitionEventHandler<HTMLDivElement>
    onTransitionRunCapture?: TransitionEventHandler<HTMLDivElement>
    onTransitionStart?: TransitionEventHandler<HTMLDivElement>
    onTransitionStartCapture?: TransitionEventHandler<HTMLDivElement>
    onWheel?: WheelEventHandler<HTMLDivElement>
    onWheelCapture?: WheelEventHandler<HTMLDivElement>
    pattern?: string

    Regex pattern that the value of the input must match to be valid. See MDN.

    placeholder?: string

    Text to display in the input when it has no value

    secondaryLabel?: string | null

    The secondary label of the text field

    size?: "small" | "medium" | Partial<Record<Breakpoint, "small" | "medium">>

    The size of the text field

    'medium'
    
    slot?: string | null

    A slot name for the component. Slots allow the component to receive props from a parent component. An explicit null value indicates that the local props completely override all props received from a parent.

    spellCheck?: string

    An enumerated attribute that defines whether the element may be checked for spelling errors. See MDN.

    style?: StyleOrFunction<TextFieldRenderProps>

    The inline style for the element. A function may be provided to compute the style based on component state.

    translate?: "yes" | "no"
    type?: "text" | "tel" | "url" | "email"

    The HTML input type for the text field

    Use SearchField for search inputs and PasswordField for password inputs.

    validate?: (value: string) => true | ValidationError | null | undefined

    A function that returns an error message if a given value is invalid. Validation errors are displayed to the user when the form is submitted if validationBehavior="native". For realtime validation, use the isInvalid prop instead.

    validationBehavior?: "native" | "aria"

    Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.

    'native'
    
    value?: string

    The current value (controlled).