Skip to content

Input

Props

API reference for Input. For usage examples, see the React tab.

NameTypeDefault
aboutstring
acceptstring
accessKeystring
alignment"left" | "right"left

Alignment of the text inside the input

altstring
autoSavestring
capture"environment" | "user" | boolean
checkedboolean
childrenReactNode
colorstring
contentstring
contextMenustring
dangerouslySetInnerHTML{ __html: string | TrustedHTML; }
datatypestring
defaultCheckedboolean
disabledboolean
exportpartsstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts (opens in new tab)

heightstring | number
inlistany
inputMode"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url"

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

See: https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute (opens in new tab)

itemIDstring
itemPropstring
itemRefstring
itemScopeboolean
itemTypestring
liststring
multipleboolean
partstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part (opens in new tab)

prefixstring
propertystring
radioGroupstring
readOnlyboolean
relstring
requiredboolean
resourcestring
resultsnumber
revstring
securitystring
size"lg" | "md" | "sm"md

Controls height, padding, and typography of the input.

srcstring
titlestring
typeofstring
unselectable"off" | "on"
vocabstring
widthstring | number
compactDeprecatedboolean

Use size instead. This prop is a no-op.