WireUI
Phone Input

The phone input extends the maskable input, and sets default input mask.

Default Input
1<x-inputs.phone label="Phone" />
Custom Input Mask
1<x-inputs.phone label="Phone" mask="['(##) ####-####', '(##) #####-####']" />
Create a Custom Input

You can create a new input component by just extending the default component.

1<?php
2 
3namespace App\View\Components;
4 
5use WireUi\View\Components\Inputs\BaseMaskable;
6 
7class CustomMaskableInput extends BaseMaskable
8{
9 protected function getInputMask(): string
10 {
11 return "['(##) ####-####', '(##) #####-####']";
12 }
13}
Input Options

The phone input accepts all maskable input options and slots