react-native-use-input-scroll-handler

A react-native hook that handle auto-scroll when input is focused and behind keyboard.

Showing:

Popularity

Downloads/wk

51

GitHub Stars

7

Maintenance

Last Commit

4mos ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

1.0KB

License

MIT

Type Definitions

Built-In

Tree-Shakeable

Yes?

Categories

Readme

react-native-use-input-scroll-handler

A react-native hook that handle auto-scroll when input is focused and behind keyboard.

Installation

yarn add react-native-use-input-scroll-handler

Usage

import useInputScrollHandler from "react-native-use-input-scroll-handler";

// ...

const { scrollHandler } = useInputScrollHandler();

<ScrollView {...scrollHandler}>

API

Custom options can be passed to this hook.

OptionTypeDescription
refMutableRefObjectUse this if you need to use your own scroll view ref.
extraScrollHeightnumberAdds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard.
keyboardOpeningTimenumberSets the delay time before scrolling to new position, default is 250

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100