Playground

States

Empty (label as placeholder), filled, error, info, and disabled. Click a field to open the list; type to filter.

Messages

Pass error for a critical message and red border, or info for neutral helper text. Error takes precedence over info.

On dark surface

Pass onDark when the field sits on a bold or dark surface — it uses the on-dark token variants for the right contrast.

When to Use

Best for

  • Choosing one value from a long list — countries, currencies, categories
  • Lists long enough that radio buttons would be unwieldy
  • Cases where type-to-filter speeds up selection

Consider alternatives when

  • There are only 2–5 options — use a Radio Button group
  • Multiple values can be selected — use checkboxes or a multi-select
  • Free-form text is needed — use Text Input

Props

PropTypeRequiredDescription
labelstringYesField label — doubles as the floating placeholder
options(string | { label, value })[]YesSelectable options
valuestringNoSelected value (controlled). Pair with onChange
defaultValuestringNoInitial selected value (uncontrolled)
onChange(value: string) => voidNoFires when an option is selected
searchablebooleanNoAllow typing to filter options (default: true)
leftIconFC<SVGProps>NoSVGR icon component shown before the value
errorstring | booleanNoError message (string) or error border only (true)
infostringNoHelper message (hidden while an error is shown)
isDisabledbooleanNoDisable the field (default: false)
onDarkbooleanNoUse on-dark token variants for dark surfaces (default: false)

Import

import { Combobox } from '@/components/Combobox/eshop';

Wrap the combobox (or any ancestor) in <div data-platform="eshop"> so the eShop typography classes apply.

Design Tokens

PurposeToken
Field fillvar(--color-fill-element-field)
Border (default / focused / error)var(--color-border-element-field[-focused|-error])
Value textvar(--color-content-primary)
Placeholder / floated labelvar(--color-content-secondary) / -tertiary
Caret & left iconvar(--color-content-secondary)
Error messagevar(--color-content-critical)
Options panelvar(--color-fill-surface-modal) + var(--surface-shadow-modal)
Focus ringvar(--color-border-element-focus-ring)
Radiusvar(--primitive-radius-12)
Typography (value / label).body-lg / .body-sm (scoped to [data-platform="eshop"])

Related Components

Page tokens