# react-touch-device-keyboard

> React virtual keyboard for touch devices. It can be used with native input/text-area element, without touching the existing code. [Click here to see it in action](https://codesandbox.io/s/winter-resonance-wrh5v)

Latest version **0.1.0** (published 2019-10-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-touch-device-keyboard
pnpm add react-touch-device-keyboard
yarn add react-touch-device-keyboard
bun add react-touch-device-keyboard
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-10-09 |
| First published | 2019-10-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 54.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | aadil hasan |
| Maintainers | aadil-hasan |
| Keywords | react-touch-device-keyboard, react-touch-device, touch-device-keyboard, react-touch-keybaoard, touch-keybaoard, web-keybaoard, virtual-keybaoard, browser-keybaoard, react-keybaoard, keybaoard, react, react js |

## Links

- npm: https://www.npmjs.com/package/react-touch-device-keyboard
- Repository: https://github.com/aadilhasan/react-touch-keyboard
- Homepage: https://github.com/aadilhasan/react-touch-keyboard#readme
- Issues: https://github.com/aadilhasan/react-touch-keyboard/issues
- npm.io page: https://npm.io/package/react-touch-device-keyboard

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16.10.2
- [react-dom](https://npm.io/package/react-dom.md) ^16.10.2
- [react-scripts](https://npm.io/package/react-scripts.md) 2.1.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2019-10-09

## README

React virtual keyboard for touch devices.
It can be used with native input/text-area element, without touching the existing code.
[Click here to see it in action](https://codesandbox.io/s/winter-resonance-wrh5v)

### install

```sh
$ npm i react-touch-device-keyboard --save
```

### use

```sh
import Keyboard from "react-touch-device-keyboard"

<Keyboard mountAt={document.getElementById("keyboard-container")}/>
```

### APIS

| API             | Type              | Description                                                                                  |
| --------------- | ----------------- | -------------------------------------------------------------------------------------------- |
| mountAt         | `dom element`     | dom element where the keyboard should mount                                                  |
| marginFromInput | `number`          | margin top in px, from the focused input element (default 10px)                              |
| alwaysOpen      | `boolean`         | if true keyboard will be alway open (default false)                                          |
| width           | `number`          | width of keyboard (defualt 900), this won't work if fullScreen is true                       |
| fullScreen      | `boolean`         | if true, keyboard will take full width of the window                                         |
| focusNextOnTab  | boolean           | if true, on press of tab focus will go to next focusable element                             |
| disabled        | `array[<string>]` | array of keys which should be disabled (key name should be in lowecase eg. - `['tab', 'a']`) |
| stickToBottom   | `boolean`         | if true keyboard will alway be in bottom of the page                                         |
| onKeyPress      | `function`        | receives character pressed in keyboard as argument                                           |

There are some life hooks also if needed -

`beforeOpen` - gets triggered every time focus changes
`afterOpen` - gets triggered every time focus changes
`beforeClose`, `afterClose`

---
_Source: https://npm.io/package/react-touch-device-keyboard · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
