Installations
npm install swipe-bottom-sheet
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
16.13.0
NPM Version
8.1.4
Score
73.5
Supply Chain
98.9
Quality
76.1
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (81.61%)
HTML (9.9%)
SCSS (8.48%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
17,056
Last Day
20
Last Week
62
Last Month
301
Last Year
2,480
GitHub Statistics
4 Stars
135 Commits
6 Forks
1 Watchers
28 Branches
1 Contributors
Updated on Feb 23, 2024
Bundle Size
9.25 kB
Minified
3.25 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.2.14
Package Id
swipe-bottom-sheet@0.2.14
Unpacked Size
61.82 kB
Size
15.75 kB
File Count
32
NPM Version
8.1.4
Node Version
16.13.0
Total Downloads
Cumulative downloads
Total Downloads
17,056
Last Day
300%
20
Compared to previous day
Last Week
-7.5%
62
Compared to previous week
Last Month
192.2%
301
Compared to previous month
Last Year
-22.2%
2,480
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
swipe-bottom-sheet
Usage in Angular
TLDR:
- Install from npm
- Inject the module into app module
- Import the scss
- Set the root view container ref to the app component's view container
- Open sheets
Install from npm
npm i swipe-bottom-sheet
Import the BottomSheetModule
into your app module
1import { BottomSheetModule } from "swipe-bottom-sheet/angular"; 2 3@NgModule({ 4 declarations: [AppComponent], 5 imports: [BrowserModule, BottomSheetModule], 6 providers: [], 7 bootstrap: [AppComponent], 8 entryComponents: [] 9}) 10export class AppModule {}
Import the module's scss
1@import "~swipe-bottom-sheet/style.scss";
Inject the BrowserSheetProvider
into your app component and set the bottomSheet's rootVcRef
property
1import { BottomSheetProvider } from "swipe-bottom-sheet/angular"; 2 3@Component({ 4 selector: "app-root", 5 templateUrl: "app.html" 6}) 7export class AppComponent { 8 constructor( 9 private bottomSheet: BottomSheetProvider, 10 vcRef: ViewContainerRef 11 ) { 12 // only set this once and do so in the app component's constructor 13 bottomSheet.rootVcRef = vcRef; 14 } 15}
Open a bottom sheet using a TemplateRef
1import { BottomSheetProvider } from "swipe-bottom-sheet/angular"; 2 3@Component({ 4 selector: "app-component", 5 templateUrl: "component.html" 6}) 7export class MyComponent { 8 constructor(private bottomSheet: BottomSheetProvider) {} 9 10 async openSheet<T>(content: TemplateRef<T>) { 11 const value = await this.bottomSheet.show(content, { 12 title: "Sheet Title", 13 stops: [270] 14 }); 15 console.log({ value }); 16 } 17}
1<button type="button" (click)="openSheet(sheetTemplate)"> 2 Open Template 3</button> 4 5<ng-template #sheetTemplate let-context> 6 <ul class="sheet-list"> 7 <li class="sheet-list-item" (click)="context.dismiss('value')"> 8 Dismiss with value 9 </li> 10 </ul> 11</ng-template>
Open a bottom sheet using a Component
Write the Component
Have BottomSheetContext
injected and use that to control the sheet
1import { BottomSheetContext } from "swipe-bottom-sheet/angular"; 2 3@Component({ 4 selector: "app-example-component", 5 template: ` 6 <ul class="sheet-list"> 7 <li 8 class="sheet-list-item" 9 (click)="context.dismiss('dismissed with value from component')" 10 > 11 Dismiss with value 12 </li> 13 </ul> 14 ` 15}) 16export class ExampleComponent { 17 constructor(public context: BottomSheetContext) {} 18}
Open the sheet with a reference to your component
1<button type="button" (click)="openSheet()"> 2 Open Component 3</button>
1import { BottomSheetProvider } from "swipe-bottom-sheet/angular"; 2import { ExampleComponent } from "./example-sheet-component"; 3 4@Component({ 5 selector: "app-component", 6 templateUrl: "component.html", 7 styles: [] 8}) 9export class MyComponent { 10 constructor(private bottomSheet: BottomSheetProvider) {} 11 12 async openSheet<T>() { 13 const value = await this.bottomSheet.show(ExampleComponent, { 14 title: "Sheet Title", 15 stops: [270] 16 }); 17 console.log({ value }); 18 } 19}

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/30 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 SAST tool detected
Details
- Warn: no pull requests merged into dev branch
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
license file not detected
Details
- Warn: project does not have a license file
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'
Reason
104 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-c75v-2vq8-878f
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-6h5x-7c5m-7cr7
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-8mmm-9v2q-x3f9
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5
- Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp
- Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq
- Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr
- Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765
- Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g
- Warn: Project is vulnerable to: GHSA-r8f7-9pfq-mjmv
- Warn: Project is vulnerable to: GHSA-jmqm-f2gx-4fjv
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-566m-qj78-rww5
- Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gqgv-6jq5-jjj9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-7mwh-4pqv-wmr8
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-c9g6-9335-x697
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-rqff-837h-mm52
- Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2
- Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j
- Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-4fc4-chg7-h8gh
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4
- Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653
- Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj
- Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67
- Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w
- Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2
- Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v
Score
1.3
/10
Last Scanned on 2025-02-03
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 MoreOther packages similar to swipe-bottom-sheet
react-native-modalize
A highly customizable modal/bottom sheet that loves scrolling content.
react-swipeable-bottom-sheet
Swipeable Bottom Sheet
@takuma-ru/vue-swipe-modal
Swipeable Bottom Sheet library for vue2 and vue3
@nosadev/vue-bottom-sheet
A Swipeable Bottom Sheet library for and vue3