react-native-bottom-modal
TypeScript icon, indicating that this package has built-in type declarations

0.5.6 • Public • Published

react-native-bottom-modal ⚛️

Install

Expo

expo install react react-native-gesture-handler

yarn add react-spring react-native-bottom-modal

Bare

yarn add react-spring react-native-bottom-modal react-native-gesture-handler

Follow install instructions for react-native-gesture-handler

Examples

  import React from 'react'
  import { BottomModalProvider, useBottomModal } from 'react-native-bottom-modal'
 
  const App = () => {
    return (
        <BottomModalProvider>
          <Example />
        </BottomModalProvider>
    )
  }
 
  const Example = () => {
    const { showModal } = useBottomModal()
    return (
      <Container>
        <Button
          onPress={() =>
            showModal({
              header: <ModalHeader/>,
              content: (
                <StyledModal>
                  <CartCheckout/>
                </StyledModal>
              ),
            })
          }
        >
          With handle
        </Button>
      </Container>
    )
  }

preview

Dependencies (0)

    Dev Dependencies (9)

    Package Sidebar

    Install

    npm i react-native-bottom-modal

    Weekly Downloads

    41

    Version

    0.5.6

    License

    MIT

    Unpacked Size

    13.4 kB

    Total Files

    10

    Last publish

    Collaborators

    • vidlec