InputUnstyled API
Documentação da API para o componente React InputUnstyled . Aprenda sobre as propriedades disponíveis e a API CSS.
Importação
import InputUnstyled from '@mui/core/InputUnstyled';
// ou
import { InputUnstyled } from '@mui/core';
Propriedades
Props of the nativo component are also available.
Nome | Tipo | Padrão | Descrição |
---|---|---|---|
autoComplete | string | This prop helps users to fill forms faster, especially on mobile devices. The name can be confusing, as it's more like an autofill. You can learn more about it following the specification. | |
autoFocus | bool | false | If true , the input element is focused during the first mount. |
className | string | Class name applied to the root element. | |
component | elementType | The component used for the root node. Either a string to use a HTML element or a component. | |
components | { Input?: elementType, Root?: elementType, Textarea?: elementType } | {} | The components used for each slot inside the InputBase. Either a string to use a HTML element or a component. |
componentsProps | object | {} | The props used for each slot inside the Input. |
defaultValue | any | The default value. Use when the component is not controlled. | |
disabled | bool | false | If true , the component is disabled. The prop defaults to the value (false ) inherited from the parent FormControl component. |
endAdornment | node | ||
error | bool | false | If true , the input will indicate an error. The prop defaults to the value (false ) inherited from the parent FormControl component. |
id | string | The id of the input element. | |
maxRows | number | Maximum number of rows to display when multiline option is set to true. | |
minRows | number | Minimum number of rows to display when multiline option is set to true. | |
multiline | bool | false | If true , a textarea element is rendered. |
name | string | Name attribute of the input element. | |
placeholder | string | The short hint displayed in the input before the user enters a value. | |
readOnly | bool | false | It prevents the user from changing the value of the field (not from interacting with the field). |
required | bool | false | |
rows | number | Number of rows to display when multiline option is set to true. | |
startAdornment | node | ||
type | string | 'text' | Type of the input element. It should be a valid HTML5 input type. |
value | any | The value of the input element, required for a controlled component. |
O
ref
é encaminhado para o elemento raiz.