Getting Started

React Setup


Installation

npm install react-simple-keyboard --save


Usage




Usage with React Hooks / Function components

React Hooks compatibility has landed as of version 2.x. Most demos however are still in the form of class components. If you’d like to integrate react-simple-keyboard in a function component, check out this demo:


Usage with Typescript

Types are included in react-simple-keyboard. For an example, check out the following demos:

For Typescript + React Hooks :

For Typescript + Class Components:


Usage with Preact and/or Preact-compat

If you run into issues using react-simple-keyboard with Preact and/or Preact-compat, please use the core simple-keyboard.


Usage with Gatsby and similar static site generators (SSR)

If you are using Gatsby or similar static site generators, it’s recommended to use the core simple-keyboard package instead.


More demos