keyboard-height
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

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) => {});

Package Sidebar

Install

npm i keyboard-height

Weekly Downloads

311

Version

1.0.6

License

MIT

Unpacked Size

13.1 kB

Total Files

12

Last publish

Collaborators

  • imaoda