npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-fluid-keyboard-view

v1.0.0

Published

A lightweight and modern keyboard-aware ScrollView for React Native with TypeScript and hooks support.

Readme

A complete rewrite of the popular react-native-keyboard-aware-scroll-view (5.4k+ stars), fixing critical bugs and bringing the library up to modern React Native standards.


The Problem

The original react-native-keyboard-aware-scroll-view hasn't been maintained since 2021 and has 165+ open issues:

  • Android 15/16 keyboard incompatibility
  • Screen bouncing when focusing inputs
  • Reset to top when switching TextInputs
  • Broken ref methods (scrollTo, scrollToEnd)
  • Extra bottom space appearing randomly
  • Flow types instead of TypeScript
  • Class components instead of hooks

The Solution

Built from scratch with modern patterns:

  • Hooks architecture — useKeyboardAwareScroll, useKeyboard
  • TypeScript native — full type exports, zero any in public API
  • forwardRef + useImperativeHandle — proper ref handling
  • Zero dependencies — no react-native-iphone-x-helper
  • React Native 0.72+ compatible

Installation

npm install react-native-smart-keyboard-view
# or
yarn add react-native-smart-keyboard-view

Quick Start

import { KeyboardAwareScrollView } from 'react-native-smart-keyboard-view'

function MyScreen() {
  return (
    <KeyboardAwareScrollView style={{ flex: 1 }}>
      <TextInput placeholder="First input" />
      <TextInput placeholder="Second input" />
      <TextInput placeholder="Third input" />
    </KeyboardAwareScrollView>
  )
}

That's it. Your inputs will automatically scroll into view when the keyboard appears.


Usage

With Ref

import { useRef } from 'react'
import { KeyboardAwareScrollView, KeyboardAwareScrollRef } from 'react-native-smart-keyboard-view'

function MyScreen() {
  const scrollRef = useRef<KeyboardAwareScrollRef>(null)

  return (
    <KeyboardAwareScrollView ref={scrollRef} style={{ flex: 1 }}>
      <TextInput onFocus={() => scrollRef.current?.scrollToPosition(0, 200)} />
    </KeyboardAwareScrollView>
  )
}

KeyboardAwareFlatList

import { KeyboardAwareFlatList } from 'react-native-smart-keyboard-view'

function MyList() {
  return (
    <KeyboardAwareFlatList
      data={items}
      renderItem={({ item }) => <TextInput value={item.value} />}
      extraHeight={100}
    />
  )
}

KeyboardAwareSectionList

import { KeyboardAwareSectionList } from 'react-native-smart-keyboard-view'

function MySections() {
  return (
    <KeyboardAwareSectionList
      sections={data}
      renderItem={({ item }) => <TextInput value={item.value} />}
      renderSectionHeader={({ section }) => <Text>{section.title}</Text>}
    />
  )
}

useKeyboard Hook

import { useKeyboard } from 'react-native-smart-keyboard-view'

function MyComponent() {
  const { isVisible, height } = useKeyboard()

  return (
    <View style={{ paddingBottom: isVisible ? height : 0 }}>
      {/* content */}
    </View>
  )
}

API Reference

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | enableAutomaticScroll | boolean | true | Auto-scroll to focused TextInput | | extraHeight | number | 75 | Extra offset above the keyboard | | extraScrollHeight | number | 0 | Extra scroll height | | enableResetScrollToCoords | boolean | true | Reset scroll position when keyboard hides | | resetScrollToCoords | {x, y} | undefined | Custom reset coordinates | | keyboardOpeningTime | number | 250 | Delay before scrolling (ms) | | viewIsInsideTabBar | boolean | false | Adjust for TabBar height | | enableOnAndroid | boolean | true | Enable keyboard handling on Android | | onKeyboardWillShow | (frame) => void | - | Keyboard will show callback | | onKeyboardWillHide | (frame) => void | - | Keyboard will hide callback | | onKeyboardDidShow | (frame) => void | - | Keyboard did show callback | | onKeyboardDidHide | (frame) => void | - | Keyboard did hide callback |

Ref Methods

| Method | Description | |--------|-------------| | scrollToPosition(x, y, animated?) | Scroll to specific position | | scrollToEnd(animated?) | Scroll to end of content | | scrollToFocusedInput(ref, options?) | Scroll to a specific TextInput | | scrollIntoView(ref, options?) | Scroll to make an element visible | | getScrollResponder() | Get the underlying ScrollView responder | | update() | Re-trigger scroll to current focused input |

Hooks

useKeyboardAwareScroll(options?)

Low-level hook for custom implementations. Returns all scroll handlers and keyboard state.

useKeyboard(options?)

Standalone hook for keyboard state. Returns { isVisible, height, frame }.


Migration from react-native-keyboard-aware-scroll-view

| Old | New | Notes | |-----|-----|-------| | innerRef | ref | Use standard ref prop | | listenToKeyboardEvents HOC | useKeyboardAwareScroll hook | Hooks instead of HOC | | enableOnAndroid default false | default true | Now enabled by default | | All other props | Same | Backward compatible |


Testing

yarn test --coverage

| Module | Stmts | Branch | Funcs | Lines | |--------|-------|--------|-------|-------| | Overall | 89.5% | 75.9% | 87% | 90.3% | | useKeyboard | 100% | 100% | 100% | 100% | | useKeyboardAwareScroll | 94.2% | 84.8% | 100% | 97.1% | | platform.ts | 100% | 100% | 100% | 100% | | measureElement | 100% | 100% | 100% | 100% | | KeyboardAwareScrollView | 76.9% | 78.6% | 66.7% | 76.9% |

86 tests across 8 suites covering keyboard events, automatic scroll, reset behavior, ref forwarding, Android specifics, and edge cases.


Contributing

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

License

MIT