@hanzo/ui

Country Select

import { CountrySelect } from '@hanzo/ui'

No examples yet.

Types

export type CountryOption = {
  /** ISO 3166-1 alpha-2, e.g. "DE". */
  value: string
  label: string
  /** Overrides the regional-indicator flag. */
  flag?: ReactNode
  disabled?: boolean
}
export type CountrySelectProps = {
  countries: CountryOption[]
  value?: string | null
  defaultValue?: string | null
  onValueChange?: (iso: string | null) => void
  /** A visible label above the trigger. */
  label?: string
  /** The trigger's name to assistive technology when there is no visible label. */
  'aria-label'?: string
  noCountryLabel?: string
  searchLabel?: string
  noResultsLabel?: string
  size?: FieldSize
  open?: boolean
  defaultOpen?: boolean
  onOpenChange?: (open: boolean) => void
  disabled?: boolean
}

Exports

CountrySelecttype CountryOptiontype CountrySelectProps