# nullstack-phone-input

> phone Input for Nullstack

Latest version **1.0.2** (published 2021-01-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install nullstack-phone-input
pnpm add nullstack-phone-input
yarn add nullstack-phone-input
bun add nullstack-phone-input
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-01-11 |
| First published | 2020-11-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mortaro |
| Maintainers | mortaro |

## Links

- npm: https://www.npmjs.com/package/nullstack-phone-input
- Repository: https://github.com/Mortaro/nullstack-phone-input
- Homepage: https://github.com/Mortaro/nullstack-phone-input#readme
- Issues: https://github.com/Mortaro/nullstack-phone-input/issues
- npm.io page: https://npm.io/package/nullstack-phone-input

## Recent versions

- 1.0.2 (latest) — 2021-01-11
- 1.0.1 — 2020-11-27
- 1.0.0 — 2020-11-25

## README

# Nullstack Phone Input

Simple input that converts user formatted input into a numerical string and the other way around.

## Install

```bash
npm install --save nullstack-phone-input
```

## Usage with one way binding

```jsx
import Nullstack from 'nullstack';
import PhoneInput from 'nullstack-phone-input';

class Application extends Nullstack {

  phone = '51999999999';

  updatePhone({value}) {
    this.phone = value;
  }

  render() {
    return (
      <PhoneInput name="phone" value={this.phone} onchange={this.updatePhone} />
    )
  }

}

export default Application;
```

## Usage with two way binding

```jsx
import Nullstack from 'nullstack';
import PhoneInput from 'nullstack-phone-input';

class Application extends Nullstack {

  phone = '51999999999';

  render() {
    return (
      <PhoneInput bind={this.phone} />
    )
  }

}

export default Application;
```

## Customization

You can customize the following attributes:

- id
- class
- placeholder
- disabled
- data-*

## Caveats

Currently this component only works with the XX 99999.9999 format

## License

Nullstack Phone Input is released under the [MIT License](https://opensource.org/licenses/MIT).

---
_Source: https://npm.io/package/nullstack-phone-input · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
