Inputs
Select
A select picks one value from a list that is long or keeps growing, such as the project a payment belongs to, in the platform's own picker.
In kanso-ui as Select
Variants and sizes
- Default: 48px (
size-control-lg). - Compact (
k-field--compact): 40px (size-control-md), for dense web forms and filter bars only. - Error (
k-field--error): as in TextField, for a select with no safe default that the person skipped: "Choose a project".
States
- Rest: a 1px
outlineborder, the chosen option inink. - Hover: the pointer turns into a hand; no colour change.
- Focus: a 2px
focus-ringring, and the border turnsink. - Open: the platform's list, which marks the chosen option with a check or a highlight.
- Error: a 2px
criticalborder, theerroricon and words, never red alone. - Disabled: don't disable a select; show the value as text and say why.
Do and don’t
Do
Put "Just me" first, then the projects in a stable order.
Preselect the likely value when it is safe.
Keep options short, with different first letters, so typing finds them.
Don’t
Use a select for two to five fixed options; RadioGroup shows them all.
Build a custom dropdown to restyle the list; the native picker is the accessible one.
Put actions such as "New project" among the options; place a button beside the field.
What you provide
- Label and an
id. - Options, each a label and a value, and the chosen value.
- Helper text and an error message (optional); compact or not.