Inputs
Search field
A search field is the pill a person types into to find payments, tasks and events; put it at the top of anything that can be searched.
In kanso-ui as SearchField
Anatomy
- Pill (
k-search): 44px,surface-sunken,radius-pill. - Search icon:
searchat 20px inink-muted, decorative. - Input: an
<input type="search">whose placeholder names what can be found. - Clear button: a 32px
k-iconbtn k-iconbtn--smwith thecloseicon, named "Clear search", shown only while there is text.
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-search | height | 48px (size-control-lg) |
padding | 0 16px (space-lg) | |
border-radius | 999px (radius-pill) | |
gap | 10px | |
min-width | 0 | |
k-search--compact | height | 40px (size-control-md) |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
paper | --kui-color-paper | #fafafa | #121212 |
surface-sunken | --kui-color-surface-sunken | #f0f0f0 | #262626 |
ink | --kui-color-ink | #1a1a1a | #ececec |
ink-muted | --kui-color-ink-muted | #5c5c5c | #b3b3b3 |
focus-ring | --kui-color-focus-ring | #1a1a1a | #ececec |
radius-pill | --kui-radius-kanso-pill | 999px | 999px |
space-lg | --kui-spacing-kanso-lg | 16px | 16px |
size-control-sm | --kui-sizing-kanso-control-sm | 32px | 32px |
size-icon-md | --kui-sizing-kanso-icon-md | 20px | 20px |
state-hover | --kui-state-layer-opacity-kanso-hover | 0.08 | 0.08 |
state-pressed | --kui-state-layer-opacity-kanso-pressed | 0.12 | 0.12 |
font-plain | --kui-typography-font-family-plain | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif |