@cassianosch/react-native-keyboard-sticky-footer-avoiding-scroll-view
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@cassianosch/react-native-keyboard-sticky-footer-avoiding-scroll-view

npm version CircleCI Status license: MIT Supports Android and iOS code style: prettier semantic-release

React Native ScrollView extension that prevents inputs from being covered by the keyboard.

Getting started

$ yarn add @cassianosch/react-native-keyboard-sticky-footer-avoiding-scroll-view

Usage

Import KeyboardAvoidingScrollView, KeyboardAvoidingFlatList, or KeyboardAvoidingSectionList and use them like the regular ScrollView, FlatList or SectionList components from React Native core. Internally, these components are wrapped in another custom component called KeyboardAvoidingContainer, which is also exported for advanced use cases.

import {KeyboardAvoidingScrollView} from '@cassianosch/react-native-keyboard-sticky-footer-avoiding-scroll-view';

function MyComponent() {
  return (
    <KeyboardAvoidingScrollView stickyFooter={<Button />}>
      <TextInput />
      <TextInput />
      <TextInput />
    </KeyboardAvoidingScrollView>
  )
}

Props


Reference

Props

stickyFooter

Used to display a fixed view under the scrollable content. Sticky footer is always shown above the keyboard, which could, for example, be the desired behaviour for a submit button.

Type Required
React.ReactNode No

containerStyle

Used to style the container component.

Type Required
StyleProp<ViewStyle> No

License

MIT License © Alka, Inc

/@cassianosch/react-native-keyboard-sticky-footer-avoiding-scroll-view/

    Package Sidebar

    Install

    npm i @cassianosch/react-native-keyboard-sticky-footer-avoiding-scroll-view

    Weekly Downloads

    8

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    28 kB

    Total Files

    23

    Last publish

    Collaborators

    • cassianosch