@hanzo/ui

Phone Country Picker

import { PhoneCountryPicker } from '@hanzo/ui'

No examples yet.

Types

export type PhoneCountry = {
  /** ISO 3166-1 alpha-2, e.g. "FR". */
  value: string
  /** The country's name in the reader's language. */
  label: string
  /** Without the "+", e.g. "33". */
  callingCode: string
  /** Overrides the regional-indicator flag. */
  flag?: ReactNode
  disabled?: boolean
}
export type PhoneCountryPickerProps = {
  countries: PhoneCountry[]
  value?: string | null
  defaultValue?: string | null
  onValueChange?: (iso: string | null) => void
  closeOnSelect?: boolean
  open?: boolean
  defaultOpen?: boolean
  onOpenChange?: (open: boolean) => void
  disabled?: boolean
  /** The segment's name to assistive technology, before the picked country. */
  label?: string
  searchLabel?: string
  emptyLabel?: string
}

Exports

PhoneCountryPickertype PhoneCountrytype PhoneCountryPickerProps