Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tak-bro/ng-numeric-keyboard

Number keyboard for mobile browsers For Angular
https://github.com/tak-bro/ng-numeric-keyboard

angular keyboard mobile mobile-keyboards mobile-web number-keyboard numberkeyboard phone-layout tel-layout

Last synced: 23 days ago
JSON representation

Number keyboard for mobile browsers For Angular

Awesome Lists containing this project

README

        

ng-numeric-keyboard

Number keyboard for mobile browsers For Angular














> This project was forked in [numeric-keyboard](https://github.com/viclm/numeric-keyboard)

## Demo

![Alt Text](https://github.com/tak-bro/ng-numeric-keyboard/raw/develop/static/demo.gif)

## Usage

### 1. Install

```
npm install ng-numeric-keyboard --save
```

import `NgNumericKeyboardModule`。

```typescript
import { NgNumericKeyboardModule } from 'ng-numeric-keyboard';

@NgModule({
imports: [ BrowserModule, NgNumericKeyboardModule ],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule { }
```

### 2. Template

```html

```

## API

Frequently used API is below. See the [link](https://github.com/viclm/numeric-keyboard#optionsprops) for more information

### Inputs
| Name | Type | Default | Description |
| -------------------------- |---------- | ------------ | --------------- |
| `layout` | string | `number` | keyboard layout. Possible layouts are `number`, `tel` and `phone` |
| `entertext` | string | `Enter` | the label of keyboard enter key |
| `placeholder` | string | | the input component's placeholder |
| `disabled` | boolean | false | disable the input component |

### Outputs
| Name | Type | Description |
| ----------------------- | ----------------- | ----------- |
| `ngModelChange()` | number | Emits when the enter key of keyboard is pressed |
| `enterpress()` | void | Emits when the input's value changes |
| `focus()` | void | Emits when called on focusing |
| `blur()` | void | Emits when the input loses the focus |

### Layouts

There are three built-in layouts called `number`, `tel` and `phone` which can be used as a replacement of system keyboard.

##### number layout
![number layout](https://github.com/tak-bro/ng-numeric-keyboard/raw/develop/static/number.png)

##### tel layout
![tel layout](https://github.com/tak-bro/ng-numeric-keyboard/raw/develop/static/tel.png)

##### phone layout
![phone layout](https://github.com/tak-bro/ng-numeric-keyboard/raw/develop/static/phone.png)

## Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

1. Use [GitHub Issues](https://github.com/tak-bro/ng-numeric-keyboard/issues) board to report bugs and feature requests (not our email address)
2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

### License

The MIT License (see the [LICENSE](https://github.com/tak-bro/ng-numeric-keyboard/blob/develop/LICENSE) file for the full text)