GithubHelp home page GithubHelp logo

00mjk / react-touch-keyboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aadilhasan/react-touch-keyboard

0.0 0.0 0.0 208 KB

react keyboard for touch devices

License: MIT License

HTML 6.24% JavaScript 9.64% CSS 8.89% TypeScript 75.23%

react-touch-keyboard's Introduction

React virtual keyboard for touch devices. It can be used with native input/text-area element, without touching the existing code.

In touch devices where keyboard is not attached web/electron apps have to rely on OS virtual keyboard which user has to manually open and close, with this app user don't have to rely on the OS keyboard anymore, the keyboard opens when a input is focused and hides when it gets blured.

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

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

react-touch-keyboard's People

Contributors

aadilhasan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.