Skip to content
+

Input

The Input component provides users with a field to enter and edit text.

Input API

Import

import { Input } from '@mui/base/Input';
// or
import { Input } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the native component are also available.

autoComplete

autoFocus

className

defaultValue

disabled

endAdornment

error

id

maxRows

minRows

multiline

name

placeholder

readOnly

required

rows

slotProps

slots

startAdornment

type

value


The ref is forwarded to the root element.

Slots

To learn how to customize the slot, check out the Overriding component structure guide.

root

input

textarea

CSS classes

These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.

.Mui-disabledSTATE

.Mui-errorSTATE

.Mui-focusedSTATE

.MuiInput-adornedEnd

.MuiInput-adornedStart

.MuiInput-formControl

.MuiInput-inputMultiline

.MuiInput-inputTypeSearch

.MuiInput-multiline