You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an input is hovered, border colors should use :hover version of their color. Same behavior is for the error input. Tokens should be defined for this.
When input is focused, we show a small shadow (from $boxShadowInputFocus token) and specific border color ($borderColorInputFocus). For focused error input use tokens $boxShadowInputErrorFocus and $borderColorInputErrorFocus
Hover & focus states are same for all input sizes and types.
Disabled state should change background and text color (background-color: $backgroundInputDisabled color: $colorTextInputDisabled), hover styles should be disabled too so it doesn’t look like there is some interaction with it. However, when disabled is hovered, we should change the cursor to "not-allowed".
Additional information
Everything inside the text field is vertically centered
Input width is 100%
The space between prefix and value/placeholder should be $spaceXSmall
Functional specs
If the user fills some value into an input, the label color needs to change to a lighter shade (an exact color is defined as a token)
The prefix should accept text or other components like icon, country flag, ...
Width of prefix should push input value to the right (for example, you can have currency $ or CZK)
Suffix should accept other components like action icon, service logo, country flag, …
Help text should be defined as text with a possibility of React component, as it can have a custom action attached to part of it (for example, click on „John Doe“ will fill the value with „John Doe")
Storybook chapters
This will be specified after we know which props we have. For now, start with playground and default. It’s very possible that there will be inputs with a prefix (icon or text), suffix (action icon or service logo)
Description
Input field is a form input that we use when we need from users to fill some simple data.
Visual style
Zeplin: https://zpl.io/2pdrdzQ
Interaction states
When an input is hovered, border colors should use :hover version of their color. Same behavior is for the error input. Tokens should be defined for this.
When input is focused, we show a small shadow (from
$boxShadowInputFocus
token) and specific border color ($borderColorInputFocus
). For focused error input use tokens$boxShadowInputErrorFocus
and$borderColorInputErrorFocus
Hover & focus states are same for all input sizes and types.
Disabled state should change background and text color (
background-color: $backgroundInputDisabled
color: $colorTextInputDisabled
), hover styles should be disabled too so it doesn’t look like there is some interaction with it. However, when disabled is hovered, we should change the cursor to "not-allowed".Additional information
Functional specs
Storybook chapters
This will be specified after we know which props we have. For now, start with playground and default. It’s very possible that there will be inputs with a prefix (icon or text), suffix (action icon or service logo)
Some inspiration
https://polaris.shopify.com/components/forms/text-field#navigation
https://www.material-ui.com/#/components/text-field
http://seek-oss.github.io/seek-style-guide/textfield/
Deprecated specs
This is from old specs, it’s probable that’s it not applicable anymore. But it shouldn’t hurt to have it here.
Proposed props
Note: feel free to update it anyhow you need or like
Visual design & design tokens
Note: this is not updated, please refer to Design tokens page at orbit.kiwi
For input
For label
For message (error & help)
For icons (front & action)
The text was updated successfully, but these errors were encountered: