@haivle/react-native-true-sheet
v0.15.0
Published
The true native bottom sheet experience for your React Native Apps.
Downloads
4
Maintainers
Readme
React Native True Sheet
The true native bottom sheet experience for your React Native Apps. 💩
Features
- Implemented in the native realm.
- Clean, fast, and lightweight.
- Asynchronus
ref
methods. - Bonus! Blur support on IOS 😎
Installation
You can install the package by using either yarn
or npm
.
yarn add @haivle/react-native-true-sheet
npm i @haivle/react-native-true-sheet
Next, run the following to install it on IOS.
cd ios && pod install
Documentation
Usage
import { TrueSheet } from "@haivle/react-native-true-sheet"
export const App = () => {
const sheet = useRef<TrueSheet>(null)
// Present the sheet ✅
const present = async () => {
await sheet.current?.present()
console.log('horray! sheet has been presented 💩')
}
// Dismiss the sheet ✅
const dismiss = async () => {
await sheet.current?.dismiss()
console.log('Bye bye 👋')
}
return (
<View>
<Button onPress={present} title="Present" />
<TrueSheet
ref={sheet}
sizes={['auto', 'large']}
cornerRadius={24}
>
<Button onPress={dismiss} title="Dismiss" />
</TrueSheet>
</View>
)
}
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.