Menu
Esc
DocsGitHub TR

Components

Selectbox

Picks one or more values from a list. The box opens a Dropdown whose options are Cells.

Open in Figma

Playground

Figma variant

🎛 Type=Basic
👕 Size=Medium
🕹 State=Default
Disable=False
Error=False
Fluid=True

Anatomy

The box shows the placeholder or the chosen value and an arrow. When it opens, a Dropdown appears 4px below it with one Cell per option; Multiselect cells have a checkbox.

See also: Dropdown, Cell

Types

Basic picks one value. Inner Label draws the label inside the box. Multiselect picks many and shows a count badge; Chip shows each choice as a chip.

Sizes

Large, Medium, Small and Tiny. Medium and Large use Medium cells in the list, Small and Tiny use Small cells.

SizeHeightPaddingGapTextArrow
large48px--space-small --space-medium--layout-smallui/text lead/regular16px
medium40px--space-tiny --space-medium--layout-smallui/text/regular16px
small32px--space-tiny --space-small--space-microui/text small/regular16px
tiny24px--space-micro --space-tiny--space-microui/text small/regular12px

States

Hover draws the primary tint line; Focus and Active (open) the primary line with the focus ring. Error turns the line, placeholder and label red and adds the error icon.

Tokens

StateBackgroundLineShadow
default--color-surface-level-1—--shadow-card-style-1
hover--color-surface-level-1--color-primary-tint--shadow-card-style-1
focus / active--color-surface-level-1--color-primary--shadow-focus-primary
error--color-surface-level-1--color-error--shadow-card-style-1
disabled--color-surface-level-2--color-surface-level-4—

Notes from Figma

  • The resting box has no line, only the card style 1 shadow, unlike Input, which has a surface/level-4 line.
  • The box radius is a raw 8px in every size; code uses --radius-form-element-small.
  • The arrows are “Icon/arrow down” and “Icon/arrow up”, which are not on the Icons page; code uses arrow-bottom and arrow-top.
  • Medium Error puts 8px between the error icon and the arrow, the other states 12px.
  • Inner Label exists only in Medium. Its resting state shows no label, so code shows the label as the placeholder until the box is focused, opened or filled.
  • Figma has no search in the list; searchable uses Cell Type=Search at the top of the Dropdown.

Figma to code

FigmaReact
🎛 Type = Basic<Selectbox options value onChange />
🎛 Type = Inner LabelinnerLabel="…"
🎛 Type = Multiselectmultiple
🎛 Type = Chipmultiple display="chips"
👕 Size = Large / Medium / Small / Tinysize='large' / 'medium' / 'small' / 'tiny'
Fluid = Falsefluid={false}
Error / Disableerror / disabled
Form Selectbox<FormField label hint><Selectbox /></FormField>