Input
An input lets people type a single line of text, like an email, a phone number, or a password.
Overview
Use an input when someone needs to enter a short piece of text or a number. It can have a label, a hint, a help icon, and a leading icon. Some types add a dropdown or a fixed text next to the field.

There are 6 types and 7 states, which makes 42 variants in total. A field can be in 4 normal states (placeholder, filled, focus, disabled). Destructive is a separate option that adds 3 error states (placeholder, filled, focus). A disabled field never shows an error.
For text that needs more than one line, use the textarea.
Anatomy

Label (optional): tells people what to enter. It sits above the field.
Field: the box where people type.
Placeholder text (optional): gives an example or brief instruction inside the empty field. It disappears when people start typing.
Leading icon (optional): an icon at the start of the field, like an email or search icon.
Help icon (optional): an icon at the end of the field. It turns into an alert icon when there is an error.
Hint (optional): short help text below the field. It becomes the error message when there is an error.
The dropdown types and the leading text type add one more part inside the field: a dropdown or fixed text before or after the typing area.
Props
Prop | Values | Notes |
|---|---|---|
type | default, leadingDropdown, trailingDropdown, leadingText, passwordHidden, passwordShown | Password shown and hidden are the two states of the eye toggle. |
state | placeholder, filled, focused, disabled | In code, use the real states (empty, has value, keyboard or pointer focus, disabled) instead of a prop. |
destructive | boolean | Error state. Not available with disabled. |
label | string | Optional. |
hint | string | Optional. Replaced by the error message when destructive is true. |
helpIcon | boolean | Shows the help icon. Becomes the alert icon when destructive is true. |
leadingIcon | icon | Optional. |
Do and Dont
Do

Always give the input a label. Don't rely on the placeholder alone
Dont

Use the placeholder as the label. It disappears once people start typing
Do

Use a hint when people need guidance on the expected format or a rule
Dont

Leave people guessing what format or information the field requires
Do

Always give the input a label. Don't rely on the placeholder alone
Dont

Show errors before people have finished typing or the field has been validated
Types
Default
A plain input. It can have a leading icon, like an email or search icon.
When to use: short text that needs no extra part, like a name or an email.
When not to use: when the value needs a unit, a country code, or a fixed prefix. Use one of the other types.

Leading dropdown
A dropdown on the left side of the field.
When to use: when the value starts with a choice, like a country code for a phone number.
When not to use: when there is only one possible choice.

Trailing dropdown
A dropdown on the right side of the field.
When to use: when the value ends with a choice, like a currency for an amount.
When not to use: when there is only one possible choice.

Leading text
A fixed piece of text on the left side of the field, like https:// for a website.
When to use: when every value starts with the same text, so people don't have to type it.
When not to use: when people may need to change that text. Use a leading dropdown instead.

Password
An input for passwords. An eye icon at the end of the field lets people show or hide what they typed.
Hidden: the characters are hidden. This is the default.
Shown: the characters are visible.
When to use: for passwords and other private values.
When not to use: for values that people need to see while they type, like an email.

Optional parts
Label
Shows what to enter. Hide it only when the context is already clear, and keep an accessibility label.
Hint
Short help text below the field. Use it for formats and rules, like how many characters a password needs.
Help icon
An icon at the end of the field for extra help.
When to use: when a longer explanation would not fit in the hint.
When not to use: when the hint already says everything. Don't add it as decoration.
Leading icon
An icon at the start of the field that hints at the kind of value, like an envelope for email.
When to use: when the icon makes the field faster to understand.
When not to use: when the icon doesn't add meaning.
States
Placeholder
The field is empty and the placeholder text is visible.

Filled
Someone has entered a value.

Focus
The field is active. A ring appears around it. For the dropdown types, the ring wraps the whole field. For leading text, the ring wraps the typing area only, and the fixed text stays outside it.

Disabled
The field can't be edited or focused. The whole field is faded.
When to use: when the field exists but can't be changed right now.
When not to use: when the reason isn't clear. If someone can't tell why a field is disabled, explain it nearby.

Destructive (error)
Shows that the value is not valid.
The border changes to the error color.
The help icon is replaced with an alert icon. On password fields, the eye icon stays and turns red.
The hint is replaced with the error message, in the error color.
The typed text and the placeholder text keep their color.
The focus ring turns red.
There is no destructive and disabled combination. A disabled field never shows an error.

Rules and behaviors
Layout
From top to bottom: label, field, then hint or error message.
The width fills the container.
The height adjusts to the content. It gets shorter when the label or hint is hidden, and taller when the hint wraps onto more lines.
The label, hint, help icon, and leading icon are all optional.
Behavior
The focus ring appears when someone taps or clicks the field, and goes away when they leave it.
An error is set by validation, usually when someone leaves the field or submits the form, not on every key press.
Disabled fields can't be focused.
The dropdowns and the leading text are part of the field, not separate controls.
On password fields, the eye icon shows or hides the characters.
Best practice
Write the label as a noun, like Email or Phone number. Write the hint as a short sentence.
Keep error messages short and say how to fix the problem.
Keep the hint in place until there is an error, then replace it with the error message. The field shouldn't jump around more than it needs to.
Accessibility
Every input needs a label. If the label is hidden, it still needs an accessibility label.
An error is shown with an alert icon and a message, not only with color.
The help icon and the password eye icon need accessibility labels.
Disabled fields look faded on purpose, but anything people need to read should be explained somewhere else on the screen (such as using tooltip).
