Input

A text field with an optional label, icons, hint, and error message.

Basic usage

A labeled field. required sets the native attribute and draws no marker, so say in the label or hint when a field is optional.

Sizes

Three sizes: mini, small, and regular (the default).

States

Default, disabled, read-only, and error. errorMessage shows below the field while error is true and is linked to it for screen readers. Type a domain with a dot to clear the error.

Enter a domain such as globex.com

With icons

iconStart and iconEnd take an icon name, an icon descriptor, or a node. Set onEndIconClick and endIconLabel to turn the end icon into a button, such as a show-password toggle.

Form example

Controlled inputs with hints, laid out in a responsive grid.

Answer engines are prompted with questions about this category
We send the weekly visibility report to this address

With suggestions

SuggestionInput wraps Input with a filtered suggestions dropdown. Import it from @repo/design-system/components/primitives/form/suggestion-input; it accepts every Input prop except standalone and fieldOverlay, plus suggestions, onSuggestionSelect, maxSuggestions (default 6), renderSuggestion, and forceShowDropdown (skeleton rows while loading).

Start typing to see suggestions

Properties

label
string

Label text for the input field

endLabel
ReactNode

Content shown at the end of the label row

placeholder
string

Placeholder text when input is empty

type
string

HTML input type (text, password, email, etc.)

Default: text

size
'mini''small''regular'

Size of the input

Default: regular

variant
'control''chromeless'

chromeless drops the field's own surface so it takes on the surface it sits on

Default: control

standalone
boolean

Renders the native input as the surface itself, with no wrapper. Cannot be combined with icons, preInputNode, fieldOverlay, or inputWrapperClassName

Default: false

disabled
boolean

Whether the input is disabled

Default: false

readOnly
boolean

Whether the input is read-only

Default: false

required
boolean

Whether the input is required

Default: false

error
boolean

Whether to display the input in error state

Default: false

errorMessage
string

Error message shown below the input while error is true

iconStart
IconValue

Icon name, descriptor, or node at the start of the input

iconEnd
IconValue

Icon name, descriptor, or node at the end of the input

onEndIconClick
(e: React.MouseEvent) => void

Callback fired when the end icon is clicked; renders the end icon as a focusable button (requires endIconLabel)

endIconLabel
string

Accessible name for the end icon button; required when onEndIconClick is set

preInputNode
ReactNode

Node rendered before the input element

fieldOverlay
ReactNode

Content anchored to the field surface, such as a suggestions popover

hint
stringReactNode

Helper text displayed below the input

value
string

Controlled input value

onChange
(e: ChangeEvent<HTMLInputElement>) => void

Callback function to handle input change

onFocus
(e: FocusEvent<HTMLInputElement>) => void

Callback function to handle input focus

onBlur
(e: FocusEvent<HTMLInputElement>) => void

Callback function to handle input blur

onKeyDown
(e: KeyboardEvent<HTMLInputElement>) => void

Callback function to handle input key down

autoFocus
boolean

Whether to auto focus the input

Default: false

autoComplete
'off''on'

Whether to auto complete the input

Default: off

className
string

Additional CSS classes to apply to the input container

inputClassName
string

Additional CSS classes to apply to the input element

inputWrapperClassName
string

Additional CSS classes to apply to the input wrapper

id
string

Native field ID. Generated when omitted; inputRest.id takes precedence

name
string

Name attribute for the input

nativeClipboardSource
boolean

Marks the input as a native clipboard source for surrounding shortcut scopes

inputRest
ComponentPropsWithoutRef<'input'>

Extra props spread onto the native input element