Gathering detailed insights and metrics for @react-native-oh-tpl/reanimated-bottom-sheet
Gathering detailed insights and metrics for @react-native-oh-tpl/reanimated-bottom-sheet
Gathering detailed insights and metrics for @react-native-oh-tpl/reanimated-bottom-sheet
Gathering detailed insights and metrics for @react-native-oh-tpl/reanimated-bottom-sheet
Highly configurable bottom sheet component made with react-native-reanimated and react-native-gesture-handler
npm install @react-native-oh-tpl/reanimated-bottom-sheet
Typescript
Module System
Node Version
NPM Version
Release 1.0.0-alpha.22
Updated on Aug 14, 2020
Release 1.0.0-alpha.21
Updated on Aug 13, 2020
Release 1.0.0-alpha.20
Updated on Apr 26, 2020
Release 1.0.0-alpha.19
Updated on Feb 14, 2020
Release 1.0.0-alpha.18
Updated on Nov 26, 2019
Release 1.0.0-alpha.17
Updated on Nov 26, 2019
TypeScript (63.52%)
JavaScript (36.48%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3,343 Stars
105 Commits
326 Forks
24 Watchers
27 Branches
29 Contributors
Updated on Jul 10, 2025
Latest Version
1.0.0-alpha.22-0.0.1
Package Id
@react-native-oh-tpl/reanimated-bottom-sheet@1.0.0-alpha.22-0.0.1
Unpacked Size
43.03 kB
Size
10.35 kB
File Count
10
NPM Version
10.2.4
Node Version
20.11.0
Published on
Nov 08, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
4
18
Highly configurable component imitating native bottom sheet behavior, with fully native 60 FPS animations!
Built from scratch with react-native-gesture-handler and react-native-reanimated.
Usable with Expo with no extra native dependencies!
![]() | ![]() | ![]() | ![]() |
---|
Open a Terminal in the project root and run:
1yarn add reanimated-bottom-sheet
Or if you use npm:
1npm install reanimated-bottom-sheet
Now we need to install react-native-gesture-handler
and react-native-reanimated
.
If you are using Expo, to ensure that you get the compatible versions of the libraries, run:
1expo install react-native-gesture-handler react-native-reanimated
If you are not using Expo, run the following:
1yarn add react-native-reanimated react-native-gesture-handler
Or if you use npm:
1npm install react-native-reanimated react-native-gesture-handler
We're done! Now you can build and run the app on your device/simulator.
1import * as React from 'react'; 2import { StyleSheet, Text, View, Button } from 'react-native'; 3import Animated from 'react-native-reanimated'; 4import BottomSheet from 'reanimated-bottom-sheet'; 5 6export default function App() { 7 const renderContent = () => ( 8 <View 9 style={{ 10 backgroundColor: 'white', 11 padding: 16, 12 height: 450, 13 }} 14 > 15 <Text>Swipe down to close</Text> 16 </View> 17 ); 18 19 const sheetRef = React.useRef(null); 20 21 return ( 22 <> 23 <View 24 style={{ 25 flex: 1, 26 backgroundColor: 'papayawhip', 27 alignItems: 'center', 28 justifyContent: 'center', 29 }} 30 > 31 <Button 32 title="Open Bottom Sheet" 33 onPress={() => sheetRef.current.snapTo(0)} 34 /> 35 </View> 36 <BottomSheet 37 ref={sheetRef} 38 snapPoints={[450, 300, 0]} 39 borderRadius={10} 40 renderContent={renderContent} 41 /> 42 </> 43 ); 44}
name | required | default | description |
---|---|---|---|
snapPoints | yes | E.g. [300, 200, 0] . Points for snapping of bottom sheet coomponent. They define distance from bottom of the screen. Might be number or percent (as string e.g. '20%' ) for points or percents of screen height from bottom. Note: Array values must be in descending order. | |
initialSnap | no | 0 | Determines initial snap point of bottom sheet. The value is the index from snapPoints. |
renderContent | no | Method for rendering scrollable content of bottom sheet. | |
renderHeader | no | Method for rendering non-scrollable header of bottom sheet. | |
enabledGestureInteraction | no | true | Defines if bottom sheet could be scrollable by gesture. |
enabledHeaderGestureInteraction | no | true | Defines if bottom sheet header could be scrollable by gesture. |
enabledContentGestureInteraction | no | true | Defines if bottom sheet content could be scrollable by gesture. |
enabledContentTapInteraction | no | true | Defines whether bottom sheet content could be tapped. Note: If you use Touchable* components inside your renderContent , you'll have to switch this to false to make handlers like onPress work. (See this comment.) |
enabledManualSnapping | no | true | If false blocks snapping using snapTo method. |
enabledBottomClamp | no | false | If true block movement is clamped from bottom to minimal snapPoint. |
enabledBottomInitialAnimation | no | false | If true sheet will grows up from bottom to initial snapPoint. |
enabledInnerScrolling | no | true | Defines whether it's possible to scroll inner content of bottom sheet. |
callbackNode | no | reanimated node which holds position of bottom sheet, where 0 it the highest snap point and 1 is the lowest. | |
contentPosition | no | reanimated node which holds position of bottom sheet's content (in dp) | |
headerPosition | no | reanimated node which holds position of bottom sheet's header (in dp) | |
overdragResistanceFactor | no | 0 | `Defines how violently sheet has to stopped while overdragging. 0 means no overdrag |
springConfig | no | { } | Overrides config for spring animation |
innerGestureHandlerRefs | no | Refs for gesture handlers used for building bottom sheet. The array consists fo three refs. The first for PanGH used for inner content scrolling. The second for PanGH used for header. The third for TapGH used for stopping scrolling the content. | |
simultaneousHandlers | no | Accepts a react ref object or an array of refs to handler components. | |
onOpenStart | no | Accepts a function to be called when the bottom sheet starts to open. | |
onOpenEnd | no | Accepts a function to be called when the bottom sheet is almost fully openned. | |
onCloseStart | no | Accepts a function to be called when the bottom sheet starts to close. | |
onCloseEnd | no | Accepts a function to be called when the bottom sheet is almost closing. | |
callbackThreshold | no | 0.01 | Accepts a float value from 0 to 1 indicating the percentage (of the gesture movement) when the callbacks are gonna be called. |
borderRadius | no | Border radius of content wrapper (excluding header) |
snapTo(index)
Imperative method on for snapping to snap point in given index. E.g.
1// Snap to the snap point at index 0 (e.g. 450 in [450, 300, 0]) 2this.bottomSheetRef.current.snapTo(0)
Here this.bottomSheetRef
refers to the ref
passed to the BottomSheet
component.
More complex examples can be found in the Example
folder. To view the examples in the Expo app, open a Terminal and run:
1yarn 2yarn prepare 3cd Example 4yarn 5expo start
The example app is also available on Expo.
It's not finished and some work has to be done yet.
We use release-it to automate our release. If you have publish access to the NPM package, run the following from the master branch to publish a new release:
1yarn release
NOTE: You must have a GITHUB_TOKEN
environment variable available. You can create a GitHub access token with the "repo" access here.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 14/26 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
180 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More