PHPackages                             mrshanebarron/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. mrshanebarron/phone-input

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

mrshanebarron/phone-input
=========================

Phone number input with country codes for Laravel - supports Livewire and Vue

v1.0.4(4mo ago)09MITVuePHP ^8.1

Since Dec 14Pushed 4mo agoCompare

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

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

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

[](#phone-input)

A phone number input with country code selector for Laravel applications. Flag dropdown with dial codes. Works with Livewire and Vue 3.

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

[](#installation)

```
composer require mrshanebarron/phone-input
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```

```

### With Default Country

[](#with-default-country)

```

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`wire:model`string-Full phone number with country code`default-country`string`'US'`Default country code`placeholder`string`'Phone number'`Input placeholderVue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbPhoneInput } from './vendor/sb-phone-input';
app.component('SbPhoneInput', SbPhoneInput);
```

### Basic Usage

[](#basic-usage-1)

```

  Full number: {{ phone }}

import { ref } from 'vue';
const phone = ref('');

```

### With Default Country

[](#with-default-country-1)

```

```

### Contact Form Example

[](#contact-form-example)

```

      Name

      Email

      Phone

      Submit

import { reactive } from 'vue';

const form = reactive({
  name: '',
  email: '',
  phone: ''
});

const submit = () => {
  console.log('Submitting:', form);
};

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`modelValue`String`''`Full phone number with dial code`defaultCountry`String`'US'`Default country code (ISO)`placeholder`String`'Phone number'`Input placeholder text### Events

[](#events)

EventPayloadDescription`update:modelValue``string`Phone number changedIncluded Countries
------------------

[](#included-countries)

CodeCountryDial CodeUSUnited States+1GBUnited Kingdom+44CACanada+1AUAustralia+61DEGermany+49FRFrance+33ITItaly+39ESSpain+34JPJapan+81CNChina+86INIndia+91BRBrazil+55MXMexico+52Features
--------

[](#features)

- **Country Selector**: Dropdown with flags and dial codes
- **Search Countries**: Filter countries by name or code
- **Flag Display**: Emoji flags for each country
- **Auto Format**: Strips non-numeric characters
- **Combined Output**: Returns full number with dial code
- **Click Outside**: Closes dropdown on outside click

Styling
-------

[](#styling)

Uses Tailwind CSS:

- Country button with flag
- Dropdown with search
- Hover highlights
- Focus ring on input
- Rounded input group

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x

License
-------

[](#license)

MIT License

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance80

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~2 days

Total

5

Last Release

139d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a38dc9b4ccc180ee3e9df8879f8747ea9dbf36812c6546827fe504fa8993eb8?d=identicon)[mrshanebarron](/maintainers/mrshanebarron)

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M858](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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