Theme
CountrySelect
Country selector dropdown with flags and dial codes
Start Here
Start from the smallest working snippet, then move to interactive examples and the full API contract below.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
svelte
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { CountrySelect } from '@dryui/ui';
</script>
<CountrySelect bind:value={country} placeholder="Select country" />Import options
Root package
ts
import { CountrySelect } from '@dryui/ui'Per-component subpath
ts
import { CountrySelect } from '@dryui/ui/country-select'Customize
Use the interactive examples to see common variants, states, and composition patterns before building your own.
Default
svelte
<script lang="ts">
let country = $state('');
</script>
<CountrySelect bind:value={country} placeholder="Select country" />With Dial Code
svelte
<CountrySelect showDialCode placeholder="Select country" />Filtered by Region
svelte
<CountrySelect
regions={['Europe']}
placeholder="Select EU country"
/>Compose
The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
value | string | '' | — | ✓ |
regions | string[] | — | — | — |
showDialCode | boolean | — | — | — |
disabled | boolean | — | — | — |
placeholder | string | — | — | — |
name | string | — | — | — |
onchange | (code: string) => void | — | — | — |
children | Snippet | — | — | — |
Forwards <div> attributes via rest props. Common examples: id, style, role. Omitted: onchange.