File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,40 @@ This comprehensive toolkit features custom hooks and utility functions tailored
10
10
and validation. It supports international standards, making it suitable for phone number processing applications across
11
11
different countries and regions.
12
12
13
+ ## Features
14
+
15
+ - Build a phone number input component with a country selector.
16
+ - Parse the phone metadata and validate phone numbers.
17
+ - Format raw phone numbers into a more readable format and the opposite.
18
+
19
+ ### useMask
20
+
21
+ ``` jsx
22
+ const PhoneInput = (props ) => {
23
+ return < input {... useMask (" +1 (...) ... ...." )} {... props}/ >
24
+ }
25
+ ```
26
+
27
+ ### usePhone
28
+
29
+ ``` javascript
30
+ const {
31
+ value ,
32
+ pattern ,
33
+ metadata ,
34
+ setValue ,
35
+ countriesList ,
36
+ } = usePhone ({
37
+ query,
38
+ country,
39
+ countryCode,
40
+ initialValue,
41
+ onlyCountries,
42
+ excludeCountries,
43
+ preferredCountries,
44
+ })
45
+ ```
46
+
13
47
## Contribute
14
48
15
49
Any contribution is welcome. Don't hesitate to open an issue or discussion if you have questions about your project's
You can’t perform that action at this time.
0 commit comments