className | string | undefined | false | The css class name to be passed through to the component markup. |
containerProps | object | undefined | false | Properties to be added to the container of the textfield. |
counter | boolean | false | false | Enables a character count. Warning requires maxlength to be set. |
defaultValue | string | number | undefined | false | The starting value of the Textfield when working in uncontrolled mode. |
dense | boolean | false | false | The size of the Textfield will be reduced. |
disabled | boolean | false | false | Textfield will be disabled. |
focused | boolean | false | false | Sets the Textfield to the focused state. |
fullWidth | boolean | false | false | The Textfield will expand to 100% width. |
helperTextId | string | undefined | false | Randomly generated id for the helper text container element. May be overwritten. |
helperTextPersistent | boolean | false | false | Set the helper text to be permanently visible. |
helperTextValidation | boolean | false | false | Set the helper text to use validation styles. Helper text changes with valid (e.g., helper text will appear red when valid is set to 'false'). |
id | string | undefined | false | Randomly generated id for the input element. May be overwritten. |
label | string | null | false | Floating input label. Note: full-width Textfields do not support floating labels - any label on a full-width Textfield will be automatically mapped to a placeholder. |
labelId | string | undefined | false | Randomly generated id for the label element. May be overwritten. |
leadingIcon | string|React.ReactNode | null | false | Adds the given Icon or Icon Button to the left of the Textfield. Expects the name of a valid Material.io icon, however in React an icon or icon button component may be passed in instead for more control, |
maxlength | number | null | false | Restricts the number of characters that can be entered, best used with counter. |
noResize | boolean | true | false | Prevents resizing when using textarea . |
placeholder | string | null | false | Non-floating label text, will be replaced when the user starts typing. |
prefixText | string | null | false | Text that will appear before the label or value of the Textfield. It will be shown on focus. An example use-case might be a currency symbol such as $ . Warning: This cannot be used with leadingIcon or textarea . |
suffixText | string | null | false | Text that will appear after the label or value of the Textfield. It will be shown on focus. An example use-case might be .00 if handling currency. Warning: This cannot be used with trailingIcon or textarea . |
textarea | boolean | false | false | Enabled multi-line text input. Note textarea cannot be used with the embedded variant. |
tooltip | boolean|object | null | false | If defined, a Tooltip will appear on the Textfield. Useful to show the full value, if the value is too long for the Textfield width. The object should be the needed Tooltip properties. Tooltip text prop will be set to the current value of the Textfield. See Tooltip docs for available props. |
trailingIcon | string|React.ReactNode | null | false | Adds the given Icon or Icon Button to the right of the Textfield . Expects the name of a valid Material.io icon, however in React an icon icon button component may be passed in instead for more control. |
type | string | 'text' | false | Support for built-in input types. Browser support for some advanced types such as color or date may be limited or appear differently between browsers. Note the Datepicker component should be preferred over the built-in date/time types as it offers more consistency and features.Note Slider type is not support, please use the Element Slider component instead. Accepted Values: text, password, color, email, url, number, tel, search, datetime-local, month, time, week, date |
valid | boolean | true | false | Applies an invalid style to the Textfield. |
value | string | number | undefined | false | The current value of the Textfield component. |
variant | string | 'filled' | false | Applies the selected styling to the Textfield. Note textarea does not support the embedded variant. Accepted Values: filled, outlined, embedded |