Input

Displays a form input field.

Use Field to compose a label, helper text, and validation message around this control.

Usage

Type

Size

Appearance

With a prefix

+33

Allow reset

Error state

Read-only state

Disabled state

Props

PropTypeDefaultDescription
type'text' | 'password' | 'email' | 'url' | 'number''text'Input type
size'sm' | 'md' | 'lg''md'Size of the input
appearance'secondary' | 'ghost''secondary'Visual style. Ghost removes the border and is suited for embedded search fields.
placeholderstring-Placeholder text
valuestring-Input value
disabledbooleanfalseWhether the input is disabled
readOnlybooleanfalseWhether the input is read-only
errorboolean | { message: string }falseError state or error message
prefixReactNode-Content to display before the input
suffixReactNode-Content to display after the input
allowResetbooleanfalseShows a reset button to clear the input
onChange(value: string, id?: string) => void-Callback when the value changes