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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.5.6
    52
    • latest

Version History

Package Sidebar

Install

npm i react-native-bottom-modal

Weekly Downloads

52

Version

0.5.6

License

MIT

Unpacked Size

13.4 kB

Total Files

10

Last publish

Collaborators

  • vidlec