Playground

States

Empty (label as placeholder), filled, error, info, and disabled. The country selector shows a flag clip placeholder until flag assets are added.

On dark surface

Pass onDark on a bold or dark surface — it uses the on-dark token variants, including the divider.

When to Use

Best for

  • Collecting a phone number with an international dial code
  • Forms where the country needs to be explicit (shipping, verification)

Consider alternatives when

Props

PropTypeRequiredDescription
labelstringNoField label (default: "Phone number")
valuestringNoPhone number (controlled). Pair with onChange
defaultValuestringNoInitial value (uncontrolled)
onChange(value: string) => voidNoChange handler
flagReactNodeNoCountry flag for the 24×24 slot (clip placeholder until assets land)
onCountryClick() => voidNoCountry-selector click handler (picker ships with flag assets)
errorstring | booleanNoError message (string) or error border only (true)
infostringNoHelper message (hidden while an error is shown)
isDisabledbooleanNoDisable the field
onDarkbooleanNoUse on-dark token variants

Import

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

Wrap in <div data-platform="eshop"> so the eShop typography classes apply. The country selector renders a flag clip placeholder; the country-picker dropdown ships with flag assets.

Design Tokens

PurposeToken
Field fillvar(--color-fill-element-field)
Border (default / focused / error)var(--color-border-element-field[-focused|-error])
Dividervar(--color-border-neutral)
Value textvar(--color-content-primary)
Flag slotvar(--color-fill-element-neutral-soft)
Error messagevar(--color-content-critical)
Focus ringvar(--color-border-element-focus-ring)
Typography (value / label).body-lg / .body-sm

Related Components

Page tokens