A Svelte based internation phone number input field that has full validation for international numbers and a dropdown menu to pick the country code
This project is not yet complete, I will update this later.
- Build the component using
yarn build
- (Optional) Create a
public
folder - (Optional) Create an
public/index.html
file - Copy the built component inside a
vendor
folder (accesible fromindex.html
) - Import the component from the HTML using the
defer
attribute<script defer src="vendor/svelte-custom-element.0.1.0.min.js"></script>
- Open the
index.html
and enjoy the web component
start
: alias ofyarn storybook
build
: builds your app as a web component and outputs a minified and a normal version to/dist
storybook
: runs the storybook, this is used when develop because of the live reloadingtest
: runs all test insidesrc/
and tries to build the widget
Currently this component has support for i18n, but I do not have the resources or time to fully implement the translations. If anyone wants to contribute to the translations feel free to create a PR, any help is appreciated.