Theme

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 { PhoneInput } from '@dryui/ui';
</script>

<PhoneInput bind:value={phone} defaultCountry="US" placeholder="(555) 123-4567" />

Import options

Root package

ts
import { PhoneInput } from '@dryui/ui'

Per-component subpath

ts
import { PhoneInput } from '@dryui/ui/phone-input'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Default

svelte
<script lang="ts">
  let phone = $state('');
</script>

<PhoneInput bind:value={phone} />

Sizes

svelte
<PhoneInput size="sm" placeholder="Small" />
<PhoneInput size="md" placeholder="Medium" />
<PhoneInput size="lg" placeholder="Large" />

Default Country

svelte
<PhoneInput defaultCountry="GB" placeholder="UK number" />

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
''
defaultCountry
string
disabled
boolean
name
string
placeholder
string
size
smmdlg
'md'
countries
CountryInfo[]
onchange
(value: string) => void

Forwards <div> attributes via rest props. Common examples: id, style, role. Omitted: onchange.