Input
A standard text box
Installation
Properties
type
Determines if the input field accepts a password, email address, number or just text. Default is 'text'
value
string
The actual text
onChange
(value: string) => void
This function is called whenever the text changes. The new text value is passed as a parameter
onFocus
() => void
callback function on focus
onBlur
(vale: string) => void
callback function on blur
onKeyDown
(e: React.KeyboardEvent, val: string) => void
callback function on key down
className
string
Any additional class names to be included for the input field
hasIndicator
boolean
Determines if an indicator should be shown at the end of the input.
indicatorColor
string
The color of the indicator icon (relevant only if hasIndicator is true)
isValid
boolean
pass a boolean to indicate if the input is valid or not
inputAttr
{ [key: string]: string | boolean }
additional attributes that can be passed to a tag
placeholder
string
placeholder value
inline
boolean
render inline
styles
React.CSSProperties
additional styles
readOnly
boolean
mark input as read only
tabIndex
number
tab index. default is 0
spacingMode
SpacingMode
type
Determines if the input field accepts a password, email address, number or just text. Default is 'text'
value
The actual text
string
onChange
This function is called whenever the text changes. The new text value is passed as a parameter
(value: string) => void
onFocus
callback function on focus
() => void
onBlur
callback function on blur
(vale: string) => void
onKeyDown
callback function on key down
(e: React.KeyboardEvent, val: string) => void
className
Any additional class names to be included for the input field
string
hasIndicator
Determines if an indicator should be shown at the end of the input.
boolean
indicatorColor
The color of the indicator icon (relevant only if hasIndicator is true)
string
isValid
pass a boolean to indicate if the input is valid or not
boolean
inputAttr
additional attributes that can be passed to a tag
{ [key: string]: string | boolean }
placeholder
placeholder value
string
inline
render inline
boolean
styles
additional styles
React.CSSProperties
readOnly
mark input as read only
boolean
tabIndex
tab index. default is 0
number
spacingMode
SpacingMode
Last updated