4.5.98 • Published 1 year ago

@diotoborg/omnis-necessitatibus v4.5.98

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

4.5.97

1 year ago

4.5.96

1 year ago

4.5.95

1 year ago

4.5.94

1 year ago

4.5.93

1 year ago

3.5.93

1 year ago

3.5.92

1 year ago

3.5.91

1 year ago

3.5.90

1 year ago

3.5.89

1 year ago

3.5.88

1 year ago

3.5.87

1 year ago

3.5.86

1 year ago

3.5.85

1 year ago

3.5.84

1 year ago

3.5.83

1 year ago

3.5.82

1 year ago

3.5.81

1 year ago

3.5.80

1 year ago

3.5.79

1 year ago

3.4.79

1 year ago

3.4.78

1 year ago

3.3.78

1 year ago

3.3.77

1 year ago

3.3.76

1 year ago

3.3.75

1 year ago

3.2.75

1 year ago

3.2.74

1 year ago

3.2.73

1 year ago

3.2.72

1 year ago

3.2.71

1 year ago

3.2.70

1 year ago

3.2.69

1 year ago

3.2.68

1 year ago

3.2.67

1 year ago

2.2.67

1 year ago

2.2.66

1 year ago

2.2.65

1 year ago

2.2.64

1 year ago

2.2.63

1 year ago

2.2.62

1 year ago

2.2.61

1 year ago

2.2.60

1 year ago

2.1.60

1 year ago

2.1.59

1 year ago

2.1.58

1 year ago

2.1.57

1 year ago

2.1.56

1 year ago

2.1.55

1 year ago

2.1.54

1 year ago

2.1.53

1 year ago

2.1.52

1 year ago

2.1.51

1 year ago

2.1.50

1 year ago

2.1.49

1 year ago

2.1.48

1 year ago

2.1.47

1 year ago

2.1.46

1 year ago

2.1.45

1 year ago

2.1.44

1 year ago

2.1.43

1 year ago

2.1.42

1 year ago

2.1.41

1 year ago

2.1.40

1 year ago

2.1.39

1 year ago

2.1.38

1 year 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