Socket
Socket
Sign inDemoInstall

react-touch-device-keyboard

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    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)


Version published
Weekly downloads
1
decreased by-88.89%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

install

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

use

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

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

APIS

APITypeDescription
mountAtdom elementdom element where the keyboard should mount
marginFromInputnumbermargin top in px, from the focused input element (default 10px)
alwaysOpenbooleanif true keyboard will be alway open (default false)
widthnumberwidth of keyboard (defualt 900), this won't work if fullScreen is true
fullScreenbooleanif true, keyboard will take full width of the window
focusNextOnTabbooleanif true, on press of tab focus will go to next focusable element
disabledarray[<string>]array of keys which should be disabled (key name should be in lowecase eg. - ['tab', 'a'])
stickToBottombooleanif true keyboard will alway be in bottom of the page
onKeyPressfunctionreceives 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

Keywords

FAQs

Last updated on 09 Oct 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc