
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
react-native-animated-bottom-sheet
Advanced tools
Swipeable, Animated, Compact - Bottom sheet for react native project
Swipeable, Animated, Compact - Bottom sheet for react native project.
onSwipe parameter that indicates swiping event.Open a Terminal in the project root and run:
npm i react-native-animated-bottom-sheet --save
Now we need to install react-native-gesture-handler
npm i react-native-gesture-handler --save
import BottomSheet from 'react-native-animated-bottom-sheet';
import React, {useState, useRef} from 'react';
import { StyleSheet, Text, View, Button, Dimensions, TouchableOpacity } from 'react-native';
const App = () => {
const bottomSheetRef: any = useRef();
const renderBottomSheetContent = (onSwipe: boolean) => (
<View
style={{
flex: 1,
alignItems: 'center',
justifyContent: 'center'}}>
<Text>{onSwipe ? 'swiping' : 'not swiping'}</Text>
</View>
)
return (
<View style={{flex: 1}}>
<TouchableOpacity onPress={() => bottomSheetRef.current.open()}>
<Text>Open!</Text>
</TouchableOpacity>
<BottomSheet
ref={bottomSheetRef}
renderContent={renderBottomSheetContent}
visibleHeight={Dimensions.get('window').height/2}/>
</View>
)
}
export default App
| Name | Type | Require | Description |
|---|---|---|---|
| renderContent | (onSwipe: boolean) => any | true | Function that returns child component to render. you can use onSwipe value to handle swipe event. |
| visibleHeight | number | true | Value that defines height to show from end of the window. |
show(value?: number)Shows the bottom sheet to value with Animation.
value: The value that the bottom sheet will move to(px from the bottom of the window)Note: Calling
show()without any parameter will show the bottom sheet tovisibleHeight
close()Closes the bottom sheet to bottom with Animation.
closeThis project is licensed under the MIT License - see the LICENSE file for details
FAQs
Swipeable, Animated, Compact - Bottom sheet for react native project
The npm package react-native-animated-bottom-sheet receives a total of 1 weekly downloads. As such, react-native-animated-bottom-sheet popularity was classified as not popular.
We found that react-native-animated-bottom-sheet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.