Textbox

Textbox

Textbox component is used for single-line text input.

Examples
API

Input props extends the input HTML attributes (except type).

PropdescriptionTypeDefault
type

The type of the input (excludes file type)

Exclude<InputType, 'file'>

undefined

typography

Typography style key from the theme

keyof DevupThemeTypography

undefined

error

Whether the input is in an error state

boolean

false

errorMessage

Error message to display below the input

string

undefined

allowClear

Whether to show a clear button when input has value

boolean

true

onClear

Callback when the clear button is clicked

() => void

undefined

icon

Icon to display on the left side of the input

React.ReactNode

undefined

disabled

Whether the input is disabled

boolean

false

classNames

Custom class names for inner elements

{
container?: string

input?: string

icon?: string

errorMessage?: string

}

undefined

colors

Custom color variables for the input

{
primary?: string

error?: string

text?: string

base?: string

iconBold?: string

border?: string

inputBackground?: string

primaryFocus?: string

negative20?: string

}

undefined