4.5.98 • Published 10 months ago

@diotoborg/omnis-necessitatibus v4.5.98

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@diotoborg/omnis-necessitatibus

šŸ¤™ International phone input component for React

npm-version build-status-badge install-size-badge codecov downloads Semantic Release stars

Live demo: Storybook

demo-gif

Features

  • šŸ˜Ž Easy to integrate - Just import and use, no need for the initial setup. Integrate with any UI library using a headless hook.
  • šŸ” Country guessing - Just start typing and the component will guess the country and format the phone. Country flags are rendered using Twemoji.
  • ✨ Lightweight - Low bundle size, no third-party dependencies.
  • 🌈 Easy to customize - Customize styles and component behavior using props.
  • ⌨ Caret position handling - Typing in the middle of the input, selection and deletion feels naturally.
  • āœ”ļø Validation - Easily validate entered phone numbers using provided functions.

Installation

$ npm i @diotoborg/omnis-necessitatibus

Basic usage

import { useState } from 'react';
import { PhoneInput } from '@diotoborg/omnis-necessitatibus';
import '@diotoborg/omnis-necessitatibus/style.css';

const App = () => {
  const [phone, setPhone] = useState('');

  return (
    <div>
      <PhoneInput
        defaultCountry="ua"
        value={phone}
        onChange={(phone) => setPhone(phone)}
      />
    </div>
  );
};

Documentation

Find the full API reference on official documentation.

Migration

You can encounter some breaking changes after update between major versions.

Checkout migration documents that contain a list of breaking changes and ways to migrate: Update from v3 to v4 Update from v2 to v3 Update from v1 to v2

faststatelessawshooksdeepflagspropertiesvalidreadableextraes8make dirmockmoveflatreact-testing-libraryreact-componentrequestconsumeURLSearchParamsproxyFloat64ArrayomitartdayjsowncompilerfastclonetrimRight_.extendspinnerpatchwgetgradients css3settingsreusenamessignedtesterbabel__proto__Observablesansibinariescss-in-jsdeep-cloneinternalreal-timedatafluxcore-jsfigletlinuxES2015chromequerylocaltestingbytecommanderurlsequencewindowdefinePropertycloneesdirtoStringTagECMAScript 2023eventEmitterwhatwgtrimEndspringsnsprefixmodulesnamees2017assignenvironmentgetOwnPropertyDescriptorloggingexitieequalObject.keysexecfilejshintsimpledbqueueMicrotaskInt32ArraygroupbyteLengthdragutil.inspectsomeECMAScript 2016scheme-validationfile systemstringbufferObject.fromEntriesobjslotarrayencryptionworkspace:*deletevariablesimportexportdependency managereventDispatcherelectrontranspilereduxECMAScript 2018regexpnegative zerohas-ownMappackagesECMAScriptquerystringgestureses5fullwidthsuperstructintrinsicposecertificatescolumnrgbgenericsES2023windowsespreesetPrototypeOfglobal this valuesymbolsvisualdescriptorramdaunicodefast-cloneESfilterSymbolkinesisStyleSheetvaluesignoreroutearraystddcomputed-typesWeakMapsharedarraybuffer@@toStringTagrequirewhichvalidationlaststatejapanesebrowserlist.gitignorecss variableSystem.globalString.prototype.trimletmetadataES2017variables in cssreact-hookssetterECMAScript 6expressiterateArray.prototype.flattentoobjectprototypeReflect.getPrototypeOfmaplocationjsdiffsymlinkRxJScollectionWebSocketjwtirqi18npreserve-symlinksmkdirpstarterdatastructureasterisksgitignorefindLastIndexidentifierstypedarrayspropcollection.es6front-endidletacitdotenvmixinsescapeendpointcallbacksigintredactpathregextransportless.jsnpmignorereadpostcss.envweakmapes6coerciblevesthigher-ordertrimLeftbabel-coreebsttyautoprefixerhashxhrdeepcopyajvpipeacornstablesuperagentRxfastcopyspawndataviewgroupByinferenceoffsetjQuerycolumnskeyvalueformattingdependenciesauthenticationdefinepureeslintwaapiES8varbootstrap cssAsyncIteratorcss nestingprotoconfigbundlingcompile lesssubprocessbyteOffsetprettyspinnersformatestreeec2authelmzeroshimECMAScript 2017callbindmrufromformseast-asian-widthchildreducerrdsjavascriptArray.prototype.filtermkdirmatchdeterministicsliceTypedArraymacosflagreact poseESnextglacierregular-expressiontermlinkstyled-componentsstoragegatewayrecursiveroutingoptimizergetbinaryArray.prototype.flatMapES7extendwafrapidhttpWeakSetdeepclonefindLastfixed-widthargumentwaitopensslerrorcommandECMAScript 3RegExp.prototype.flagsdescriptorsconsoletyped arrayfetchtsframerArrayBufferkeysjsdomuninstallPromiseRegExp#flagsUint16ArraySymbol.toStringTagrangeerrorcircularlrutelephoneeslint-pluginemrtoArrayremoveutilscommand-lineprotocol-bufferstypeofserializehelperajaxJSONcoreequalitytostringtagfastifyArray.prototype.findLastIndexdataView256popmotioninvarianttypeECMAScript 2022callboundapischemejson-schema-validatorstatusjsonsesassertpackage.jsonstringifyReactiveExtensionsObjectairbnbarktype-0JSON-SchemaUint32ArrayES2016pyyamlFunction.prototype.nameredirectglobalThiscopydom-testing-libraryzxlanguagesortedPushsortObject.entriesinterruptsutilitieseventsmatchAllforEachjsprocessenumerablelogthreeES2018managerfpless mixinsfunctionscryptECMAScript 2019call-bindStreamsresolveES5inpluginanimationbuffersiteratorglobregular expressionObject.iscall-boundcharacterArray.prototype.findLastnodelistenersmonoreposafewidthcreatecolorsbusymakedomObject.getPrototypeOfcryptoinputmoduleastcensortranspilerIteratorECMAScript 2015back-endcssstylingmulti-packagetest[[Prototype]]callsharedentrieslazybootstrap lessperformantjson-schemaCSSquotees-shimspnpm9swfawesomesaucebddECMAScript 2020ruleslesscssmergegetintrinsicsymbollibphonenumberparsecjkreactpoint-freeURLpicomatchfpscliYAMLtoolspackage managerimportclassesgetPrototypeOfReactiveXshrinkwrapsignalsconcatMapaccessibilitylintcloudformationArrayBuffer#sliceperformanceyupfilesqsmobilereplay
4.5.98

10 months ago

4.5.97

10 months ago

4.5.96

10 months ago

4.5.95

10 months ago

4.5.94

10 months ago

4.5.93

10 months ago

3.5.93

10 months ago

3.5.92

10 months ago

3.5.91

10 months ago

3.5.90

10 months ago

3.5.89

10 months ago

3.5.88

10 months ago

3.5.87

10 months ago

3.5.86

10 months ago

3.5.85

10 months ago

3.5.84

10 months ago

3.5.83

10 months ago

3.5.82

11 months ago

3.5.81

11 months ago

3.5.80

11 months ago

3.5.79

11 months ago

3.4.79

11 months ago

3.4.78

11 months ago

3.3.78

11 months ago

3.3.77

11 months ago

3.3.76

11 months ago

3.3.75

11 months ago

3.2.75

11 months ago

3.2.74

11 months ago

3.2.73

11 months ago

3.2.72

11 months ago

3.2.71

11 months ago

3.2.70

11 months ago

3.2.69

11 months ago

3.2.68

11 months ago

3.2.67

11 months ago

2.2.67

11 months ago

2.2.66

11 months ago

2.2.65

11 months ago

2.2.64

11 months ago

2.2.63

11 months ago

2.2.62

11 months ago

2.2.61

11 months ago

2.2.60

11 months ago

2.1.60

11 months ago

2.1.59

11 months ago

2.1.58

11 months ago

2.1.57

12 months ago

2.1.56

12 months ago

2.1.55

12 months ago

2.1.54

12 months ago

2.1.53

12 months ago

2.1.52

12 months ago

2.1.51

12 months ago

2.1.50

12 months ago

2.1.49

12 months ago

2.1.48

12 months ago

2.1.47

12 months ago

2.1.46

12 months ago

2.1.45

12 months ago

2.1.44

12 months ago

2.1.43

12 months ago

2.1.42

12 months ago

2.1.41

12 months ago

2.1.40

12 months ago

2.1.39

12 months ago

2.1.38

12 months ago

2.1.37

1 year ago

2.1.36

1 year ago

2.1.35

1 year ago

2.1.34

1 year ago

2.1.33

1 year ago

2.1.32

1 year ago

2.1.31

1 year ago

2.1.30

1 year ago

2.1.29

1 year ago

2.1.28

1 year ago

2.1.27

1 year ago

2.1.26

1 year ago

2.1.25

1 year ago

2.0.25

1 year ago

2.0.24

1 year ago

2.0.23

1 year ago

2.0.22

1 year ago

2.0.21

1 year ago

2.0.20

1 year ago

2.0.19

1 year ago

2.0.18

1 year ago

2.0.17

1 year ago

2.0.16

1 year ago

2.0.15

1 year ago

2.0.14

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago