title: Taro.onKeyboardHeightChange(callback)
sidebar_label: onKeyboardHeightChange
Listens on the keyboard height changes
Type
(callback: Callback) => void
Parameters
Callback
(result: CallbackResult) => void
Property | Type |
---|---|
result | CallbackResult |
CallbackResult
Property | Type | Description |
---|---|---|
height | number |
keyboard height |
Sample Code
Taro.onKeyboardHeightChange(res => {
console.log(res.height)
})
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
Taro.onKeyboardHeightChange | ✔️ | ✔️ |