Prebuilt Layer Layer III

International Input

A universal international input component featuring a country flag dropdown and mode-based format placeholders for phone numbers, timezones, country codes, and currencies.

01

Props

PropTypeDefaultDescription
idstringrequired

The unique identifier for the component wrapper.

modeInternationalInputMode'phone'

The input mode: 'phone' | 'country' | 'timezone' | 'currency' | 'dialCode'.

selectedCountrystring'US'

The selected ISO country code. Supports $bindable.

dialCodestring'+1'

The selected international dial code. Supports $bindable.

valuestring''

The input text/phone value. Supports $bindable.

placeholderstringundefined

Custom placeholder. If omitted, uses the country's example format for the current mode.

searchPlaceholderstring'Search country...'

Placeholder text for the country search input.

disabledbooleanfalse

Whether the input is disabled.

variantstring''

User-defined variant name, added to the root element. Style it with a CSS rule that starts from the root.

02

Samples

1. Phone Number Mode

Features a country flag & dial code dropdown with numeric-only phone input and greyed-out format placeholder.

Selected: US | Dial Code: +1 | Value:

<script>
  import { InternationalInput } from 'fluid-ui-svelte/prebuilt';
 
  let phoneNumber = $state('');
  let selectedCountry = $state('US');
  let dialCode = $state('+1');
</script>
 
<InternationalInput 
  id="user-phone-input"
  mode="phone"
  bind:value={phoneNumber} 
  bind:selectedCountry
  bind:dialCode
/>

2. Country Only Mode

Clean country picker without an extra input field.

Selected Country: US

<script>
  import { InternationalInput } from 'fluid-ui-svelte/prebuilt';
 
  let selectedCountry = $state('US');
</script>
 
<InternationalInput 
  id="user-country-picker"
  mode="country"
  bind:selectedCountry
/>

3. Currency Mode

Flag and currency selector paired with a numeric amount input.

Country: US | Amount:

<script>
  import { InternationalInput } from 'fluid-ui-svelte/prebuilt';
 
  let amount = $state('');
  let selectedCountry = $state('US');
</script>
 
<InternationalInput 
  id="user-currency-input"
  mode="currency"
  bind:value={amount}
  bind:selectedCountry
/>