Phone Input

An international phone number input with country selector and validation.

Parsing, formatting, and validation are handled by svelte-tel-input (a libphonenumber wrapper) — lily only styles it.

Installation

npx lily-svelte@latest add phone-input

Usage

<script lang="ts">
	import { PhoneInput } from '$lib/components/ui/phone-input';
 
	let value = $state('');
	let valid = $state(true);
</script>
 
<PhoneInput defaultCountry="US" bind:value bind:valid />

Built by levish. The source code is available on GitHub.

Quiet by design.