Skip to content

react-native-keyboard-controller brings smooth keyboard animations

updated

react-native-keyboard-controller aims to bring keyboard open/close transitions to React Native apps that are as smooth as those in natively written flagship applications such as Telegram and Instagram.

Its announcement says keyboard handling in react-native was given little attention, which left apps with rough animations and made cross-platform code difficult because some keyboard events were not available on every platform.

The library is designed to use the native APIs of each platform while offering a universal way to work with them in react-native, with the option to use platform-specific advanced techniques when needed. It allows developers to track each keyboard frame movement and respond to it, for example by moving elements accordingly.

First release

The first release includes:

  • The missing keyboardWillShow/keyboardWillHide events on Android, making the events module fully cross-platform
  • A way to use Animated.Value for managing keyboard frames

Planned enhancements

The post lists several improvements planned for future releases:

  • Support for interactive keyboard dismissing on Android
  • A rewrite of the library for the new Fabric architecture
  • Possibly, components such as KeyboardAvoidingView/KeyboardAwareScrollView with better performance and animations

Source: kirillzyusko.github.io