Installations
npm install docking-bottom-sheet
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
12.6.0
NPM Version
6.9.0
Score
70.8
Supply Chain
86
Quality
75.5
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
iamrajatsoni
Download Statistics
Total Downloads
2,708
Last Day
1
Last Week
2
Last Month
22
Last Year
206
GitHub Statistics
MIT License
17 Stars
9 Commits
7 Forks
1 Watchers
1 Branches
2 Contributors
Updated on Nov 21, 2023
Package Meta Information
Latest Version
1.0.6
Package Id
docking-bottom-sheet@1.0.6
Unpacked Size
19.64 kB
Size
4.74 kB
File Count
5
NPM Version
6.9.0
Node Version
12.6.0
Total Downloads
Cumulative downloads
Total Downloads
2,708
Last Day
0%
1
Compared to previous day
Last Week
0%
2
Compared to previous week
Last Month
-8.3%
22
Compared to previous month
Last Year
1%
206
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads

No dependencies detected.
docking-bottom-sheet

Demo link: https://github.com/iamrajatsoni/DockingBottomSheet/tree/master/demo

DockingBottomSheet offers a React Native component that takes in 2 types of content views as props. One is Main content view and the other is Bottom-Sheet content view. Initially Main view is the active view when Bottom-Sheet is docked at the bottom. It can also be expanded and docked at the top by dragging or using function
expandBottomSheet()
. Once expanded,dockBottomSheet()
function can be used to programmatically dock the rendered bottom-sheet. Various other props are exposed that can be used to customiseDockingBottomSheet
depending on one's requirement.
Installation
1$ npm i docking-bottom-sheet
Import and Basic Usage
Import
1import DockingBottomSheet from 'docking-bottom-sheet'
1var DockingBottomSheet = require('docking-bottom-sheet');
Basic Usage
1<DockingBottomSheet 2 ref={ (bottomSheetRef)=> this.bottomSheetRef = bottomSheetRef } 3 containerStyle={ <style object> } 4 dockHeight={ <number> } 5 sheetExpandedTopOffset={ <number> } 6 sheetDarknessAlpha={ <float (0 to 1)> } 7 mainViewDownScale={ <float (0 to 1)> } 8 mainContentView={ <function that returns UI elements> } 9 bottomSheetContentView={ <function that returns UI elements> } 10/>
Props
-
containerStyle [Object]: Styling for
View
that holdsmain-view
andbottom-sheet
views.default: { flex: 1 }
-
dockHeight [Number]: Visible height of
bottom-sheet
when it is docked at the bottom.default: 96
-
sheetExpandedTopOffset [Number]: Top-offset of
bottom-sheet
in its expanded state.default: 128
-
sheetDarknessAlpha [Float]: The final background darkness alpha of
bottom-sheet
when its completely expanded.default: 0.7
-
mainViewDownScale [Float]: The final scale-down value of View
[main-view]
behindbottom-sheet
scales down when its completely expanded.default: 0.9
-
mainContentView [Function]: Function that returns View
[main-view]
to be rendered behindbottom-sheet
.default: () => null
-
bottomSheetContentView [Function]: Function that returns View to be rendered as
bottom-sheet
[Note: the bottom-sheet itself is a scroll-view so do not pass scroll-view as parent view-element to this prop].default: () => null
Functions
-
expandBottomSheet(): Used to programmatically expand
bottom-sheet
.eg. bottomSheetRef.expandBottomSheet()
-
dockBottomSheet(): Used to programmatically dock
bottom-sheet
at the bottom.eg. bottomSheetRef.dockBottomSheet()
Note
- Bottom-Sheet's parent is a React Native ScrollView, hence avoid passing ScrollView as root component to prop
bottomSheetContentView
.
License
MIT © Rajat Soni

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-02-17
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