Input

A field for one line of text, with text area, password, search and one-time code fields alongside it.

Basic

A single-line text field for short values like a name, with a placeholder that hints at what to type.

Sizes

Set size to large or small to change the field's height, with medium as the default in between.

Variants

Set variant to outlined, filled, text, underlined, borderless or bare to match the other fields in your form. text fills on hover and while focused, and bare draws nothing at all.

Status

Set status to warning or error to color the border, and a prefix icon along with it.

Disabled

Set disabled to show a value that cannot be edited or focused, like a workspace name only an admin can change.

Clear button

Set allowClear on an Input or Input.TextArea to show a button that empties the field once it has a value.

Prefix and suffix

Pass prefix and suffix to place an icon, text or a tooltip inside the field, like a search glyph or a $ sign.

Character count

Set showCount with maxLength to show the character count against its limit, on an Input or an Input.TextArea.

Custom count

Pass count.strategy to count characters your own way, like counting each emoji as one character.

Password

Input.Password hides what is typed and adds an eye button that shows it.

Controlled visibility

Pass visibilityToggle an object with visible and onVisibleChange to show the password from your own state, like a checkbox.
Input.Search adds a search button: set enterButton to make it primary or give it a label, and loading while results load.

Text area

Input.TextArea takes several lines of text, with rows setting how tall it starts.

Auto size

Set autoSize on Input.TextArea to grow it with its content, between minRows and maxRows when you set them.

One-time code

Input.OTP gives each character of a one-time code its own cell, set by length, and moves to the next cell as you type.

Masked code

Set mask on Input.OTP to hide each character as it is typed, like the digits of a PIN.

Formatted code

Pass formatter to change what is typed and separator to draw a mark between cells, like uppercase letters split by a dash.

Compact group

Wrap an Input in Space.Compact to join it with a button or a Select into one control.

In a form

Put an Input in a Form.Item with rules to validate it, with help text in extra and the error shown below the field.

Password strength

An Input.Password with a Progress bar and a checklist that fill in as the password meets each rule.

In context

The component inside real screens, with the components it usually sits beside.

API key field

An API key card with a masked, read-only Input, show and copy buttons in its suffix, and a confirm before regenerating.

API Reference

Input
Input's props. Rows marked antuikit in the Version column are added by the kit.
CountConfig
CountConfig's props.
Input.TextArea
Input.TextArea's props. Rows marked antuikit in the Version column are added by the kit.
Input.Search
Input.Search's props. Rows marked antuikit in the Version column are added by the kit.
Input.Password
Input.Password's props. Rows marked antuikit in the Version column are added by the kit.
VisibilityToggle
VisibilityToggle's props.
Input.OTP
Input.OTP's props. Rows marked antuikit in the Version column are added by the kit.
Methods
The methods on the ref of Input, TextArea, Search and Password.