# Svelte component for intl-tel-input

For entering, formatting, and validating international telephone numbers. Requires Svelte 5.

[Explore docs »](https://intl-tel-input.com/docs/svelte-component)

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jackocnr/intl-tel-input/master/screenshots/iti-github-dark.png">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/jackocnr/intl-tel-input/master/screenshots/iti-github-light.png">
  <img width="271" height="279" alt="intl-tel-input screenshot showing country dropdown open" src="https://raw.githubusercontent.com/jackocnr/intl-tel-input/master/screenshots/iti-github-light.png">
</picture>

## Resources

Check out the [website](https://intl-tel-input.com), where you can find [a full set of docs](https://intl-tel-input.com/docs/svelte-component), a [live playground](https://intl-tel-input.com/playground/) where you can try out all of the options, as well as plenty of [examples](https://intl-tel-input.com/examples/svelte-component/validation) of different setups.

Browser support: same as the core library — see the [FAQ](https://intl-tel-input.com/docs/faq#which-browsers-are-supported) for minimum versions.

## Running the demos locally

1. Initialise the submodules: `git submodule update --init --recursive`
2. Install dependencies: `npm install`
3. Build: `npm run build`
4. Run a demo: `npm run svelte:demo` and copy the given URL into your browser.

This defaults to the validation demo — to run a different one, set the `DEMO` env var, e.g. `DEMO=simple npm run svelte:demo`. View the full list of [available demos](https://github.com/jackocnr/intl-tel-input/tree/master/packages/svelte/demo).

## Issues and contributing

Please report issues and open pull requests on the [main repository](https://github.com/jackocnr/intl-tel-input).

## License

MIT
