InputAdornment API
Documentação da API para o componente React InputAdornment . Aprenda sobre as propriedades disponíveis e a API CSS.
Importação
import InputAdornment from '@mui/material/InputAdornment';
// ou
import { InputAdornment } from '@mui/material';Nome do componente
The nameMuiInputAdornment can be used when providing default props or style overrides in the theme.Propriedades
Propriedades do componente nativo também estão disponíveis.
| Nome | Tipo | Padrão | Descrição |
|---|---|---|---|
| position* | 'end' | 'start' | The position this adornment should appear relative to the Input. | |
| children | node | The content of the component, normally an IconButton or string. | |
| classes | object | Sobrescreve ou extende os estilos aplicados para o componente. Veja a API CSS abaixo para maiores detalhes. | |
| component | elementType | The component used for the root node. Either a string to use a HTML element or a component. | |
| disablePointerEvents | bool | false | Disable pointer events on the root. This allows for the content of the adornment to focus the input on click. |
| disableTypography | bool | false | If children is a string then disable wrapping in a Typography component. |
| sx | Array<func | object | bool> | func | object | The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details. | |
| variant | 'filled' | 'outlined' | 'standard' | The variant to use. Note: If you are using the TextField component or the FormControl component you do not have to set this manually. |
O
ref é encaminhado para o elemento raiz.CSS
| Nome da regra | Classe global | Descrição |
|---|---|---|
| root | .MuiInputAdornment-root | Estilos aplicados ao elemento raiz. |
| filled | .MuiInputAdornment-filled | Estilos aplicados para o elemento raiz se variant="filled". |
| outlined | .MuiInputAdornment-outlined | Estilos aplicados para o elemento raiz se variant="outlined". |
| standard | .MuiInputAdornment-standard | Estilos aplicados para o elemento raiz se variant="standard". |
| positionStart | .MuiInputAdornment-positionStart | Estilos aplicados para o elemento raiz se position="start". |
| positionEnd | .MuiInputAdornment-positionEnd | Estilos aplicados para o elemento raiz se position="end". |
| disablePointerEvents | .MuiInputAdornment-disablePointerEvents | Estilos aplicados para o elemento raiz se disablePointerEvents={true}. |
| hiddenLabel | .MuiInputAdornment-hiddenLabel | Styles applied if the adornment is used inside |
| sizeSmall | .MuiInputAdornment-sizeSmall | Styles applied if the adornment is used inside |
Você pode sobrescrever o estilo do componente usando uma dessas opções de customização:
- Com um nome de classe global.
- Com um nome de regra como parte da propriedade
styleOverridesdo componente em um tema personalizado.