react-native-sheet-ios
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

react-native-sheet-ios

make an ios sheet to show additional information on top of the current screen.

Installation

npm install react-native-sheet-ios
cd ios && pod install

Usage

The library only works for IOS and min version 13, please make a condition otherwise fatal error may occur. all props works. The view inside the sheet is a child component, styles should be written there.

import { SheetIosView } from 'react-native-sheet-ios';

// ...
const [present, setPresent] = React.useState(false);

<SheetIosView
  present={present}
  halfSheet // support only for ios 16
  cancelButton // show ios native cancel button and override the close button
  onDismissSheet={() => setPresent(!present)} // callback when dismissed
  showCloseButton // can be hidden
  closeButtonColor={'000080'} // hex color only!
>
  <ChildComponent />
</SheetIosView>;

Example

https://github.com/Talkwondo/react-native-sheet-ios/assets/20122139/402515b9-1f1d-4564-8dff-9bc8b9af6145

Contributing

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

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i react-native-sheet-ios

Weekly Downloads

13

Version

1.2.1

License

MIT

Unpacked Size

68.6 MB

Total Files

63

Last publish

Collaborators

  • talkwondo