JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 994
  • Score
    100M100P100Q104663F
  • License MIT

calaculate the height of soft keyboard in mobile phone and emit on changes

Package Exports

  • keyboard-height
  • keyboard-height/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (keyboard-height) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

keyboard-height

introduction

calaculate the height of soft keyboard in mobile phone and emit on changes

计算软键盘高度,并支持监听键盘的高度变化 (比如切换键盘类型、或者弹出收起键盘引起的)

usage

import keyboardObserver from "keyboard-height";

// get current height of soft keyboard
// 获取当前键盘高度
keyboardObserver.getHeight(); // 400

// listen soft keyboard height changes
// 监听键盘高度变化
keyboardObserver.on((newHeight) => {});