Skip to content

Country Select

Country picker with flags and search.

Installation

bun add @xerobi/ui
import { CountrySelect } from "@xerobi/ui/country-select"

This component is client-side. In Astro, hydrate it with a client directive.

API reference

CountrySelect

PropTypeDescription
idstring
labelstring
errorboolean
disabledboolean
placeholderstring
helperTextstring | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>
classNamestring
getValue"code" | "label"Whether `value` and `onChange` carry the country name or its ISO code.
multipleboolean
valuestring | string[]
onChange(value: string | string[]) => void
emptyTextstring

Search documentation

Search pages, components and blocks.