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(6mo ago)09MITVuePHP ^8.1

Since Dec 14Pushed 6mo 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 today

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

33

—

LowBetter than 72% of packages

Maintenance67

Regular maintenance activity

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

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

195d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/193358540?v=4)[Mr Shane Barron](/maintainers/mrshanebarron)[@mrshanebarron](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

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