
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
svelte-tel-input
Advanced tools
Lightweight svelte tel/phone input standardizer.
The package is recently bumped to 1.0. If you experience any problems, please open an issue, to be able to me to fix it.
<a href="tel+36201234567 />.Svelte Tel Input is distributed via npm.
npm install --save svelte-tel-input
E164), no matter how users type their phone numbers.+ sign (and space optionally).+ sign (and space optionally).REPL (StackBlitz)
<script lang="ts">
import TelInput from 'svelte-tel-input';
import type { NormalizedTelNumber, CountryCode, E164Number } from 'svelte-tel-input/types';
// Any Country Code Alpha-2 (ISO 3166)
let country: CountryCode | null = 'HU';
// You must use E164 number format. It's guarantee the parsing and storing consistency.
let value: E164Number | null = '+36301234567';
// Optional - Extended information about the parsed phone number
let parsedTelInput: NormalizedTelNumber | null = null;
</script>
<TelInput bind:country bind:parsedTelInput bind:value class="any class passed down" />
The default export of the library is the main TelInput component. It has the following props:
| Props | Type | Default Value | Usage |
|---|---|---|---|
| country | CountryCode | null | null | It's accept any Country Code Alpha-2 (ISO 3166). You can set manually (e.g: by the user via a select). The parser will inspect the entered phone number and if it detect a valid country calling code, then it's automatically set the country to according to the detected country calling code. E.g: +36 -> HU |
| disabled | boolean | false | It's block the parser and prevent entering input. You must handle its styling on your own. |
| valid | boolean | true | Indicates whether the entered tel number validity. |
| value | E164Number | null | null | E164 is the international format of phone.numbers. This is the main entry point to store and/or load an existent phone number. |
| parsedTelInput | NormalizedTelInput |null | null | All of the formatted results of the tel input. |
| class | string | `` | You can pass down any classname to the component |
| Package | Changelog |
|---|---|
| @gyurielf/svelte-tel-input | Changelog |
See the open issues for a list of proposed features (and known issues).
Distributed under the MIT License. See LICENSE.md for more information.
FAQs
svelte-tel-input
The npm package svelte-tel-input receives a total of 7,033 weekly downloads. As such, svelte-tel-input popularity was classified as popular.
We found that svelte-tel-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.