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
| Prop | Type | Description |
|---|---|---|
| id | string | |
| label | string | |
| error | boolean | |
| disabled | boolean | |
| placeholder | string | |
| helperText | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | |
| className | string | |
| getValue | "code" | "label" | Whether `value` and `onChange` carry the country name or its ISO code. |
| multiple | boolean | |
| value | string | string[] | |
| onChange | (value: string | string[]) => void | |
| emptyText | string |