PHPackages                             webcito/bs-phone-input - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webcito/bs-phone-input

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webcito/bs-phone-input
======================

description

016HTML

Since Jul 2Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/ThomasDev-de/bs-phone-input)[ Packagist](https://packagist.org/packages/webcito/bs-phone-input)[ RSS](/packages/webcito-bs-phone-input/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Phone Input
===========

[](#phone-input)

This plugin creates an input group preceded by a dropdown of all countries.

Installation
------------

[](#installation)

### manual

[](#manual)

Download and include the script at the end of the body tag.

```

```

### composer

[](#composer)

via command

```
composer require webcito/bs-phone-input:dev-main
```

via composer.json

```
{
  "require": {
    "webcito/bs-phone-input": "dev-main"
  }
}
```

Usage
-----

[](#usage)

All inputs with the attribute `[data-bs-toggle="phone"]` are initialized automatically.

```

    $('#example').bsPhone();

```

Options
-------

[](#options)

propertydata-attributetypedefaultdescdefault\[data-default\]`string``de`*The ISO code of the country to be preselected*limitedCountries\[data-limited-countries\]`array``[]`*If only certain countries should appear in the drop-down list, the country codes could be entered here*inputGroupClasses\[data-input-group-classes\]`string``mb-3`*The CSS classes are set to the parent element (.input-group)*dropDownClasses\[data-drop-down-classes\]`string``btn btn-outline-secondary`*The CSS classes are set to the DropDown button*dropDownMaxHeight\[data-drop-down-max-height\]`string``50vh`*CSS property for the height of the scrollable area in the DropDown menu*inputClasses\[data-input-classes\]`string``border-secondary rounded-end`*Additional CSS classes for the input field*formatValue`function`*The formatting for the result in the original input field. 2 parameters are provided: (phoneCode, value) =&gt; {}*formatView`function`*The formatting for the result in the displayed input field. 2 parameters are provided: (phoneCode, value) =&gt; {}*Methods
-------

[](#methods)

Methods are called as follows

```
$('input').bsPhone('method', param);
```

methodexampledescription`'val'``$('#example').bsPhone('val', '+49123456789');`Sets the value of the input`'val'``$('#example').bsPhone('val');` or `$('#example').val();`Get the value of the input

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d5f10c16b4b6bd1ac531ffc39c23c569490ec4630829511692c03ec89d36a11?d=identicon)[thomasK81](/maintainers/thomasK81)

---

Top Contributors

[![ThomasDev-de](https://avatars.githubusercontent.com/u/67106837?v=4)](https://github.com/ThomasDev-de "ThomasDev-de (18 commits)")

### Embed Badge

![Health badge](/badges/webcito-bs-phone-input/health.svg)

```
[![Health](https://phpackages.com/badges/webcito-bs-phone-input/health.svg)](https://phpackages.com/packages/webcito-bs-phone-input)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
