TELPICK
Multi-platform country and phone code selector with a modern design, smooth animations, and automatic IP detection.
Install with npm
npm install telpick
Install with pnpm
pnpm add telpick
Install with yarn
yarn add telpick
Include from CDN
<script src="https://unpkg.com/telpick@latest/dist/telpick.umd.js"></script>
Click on the selector to try it. The component automatically detects your country by IP.
After installing the package, import the CSS styles and the component according to your framework.
# Install the packagenpm install telpick# Import CSS styles (required)import 'telpick/dist/style.css'# Import componentimport { TelpickReact } from 'telpick/react'
// React Componentimport React, { useState } from 'react'import { TelpickReact } from 'telpick/react'import 'telpick/dist/style.css'function App() { const [selectedCountry, setSelectedCountry] = useState(null) return ( <TelpickReact code={null} onChange={(country) => { console.log('Selected country:', country) setSelectedCountry(country) }} /> )}
<!-- Vue 3 Component --><template> <TelpickVue :code="selectedCode" @update:code="handleCountryChange" /></template><script setup>import { ref } from 'vue'import { TelpickVue } from 'telpick/vue'import 'telpick/dist/style.css'const selectedCode = ref(null)const handleCountryChange = (country) => { console.log('Selected country:', country) selectedCode.value = country.country_code}</script>
<!-- HTML --><link rel="stylesheet" href="https://unpkg.com/telpick@latest/dist/style.css"><div id="telpick-container"></div><script src="https://unpkg.com/telpick@latest/dist/telpick.umd.js"></script>// JavaScriptconst telpick = new Telpick({ code: null, onChange: (country) => { console.log('Selected country:', country) }})telpick.init(document.getElementById('telpick-container'))