Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a75fd95

Browse files
committed
initial commit
0 parents commit a75fd95

File tree

5 files changed

+557
-0
lines changed

5 files changed

+557
-0
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

‎README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# NativeScript-Vue Multi Drawer
2+
3+
A plugin which provides a drawer component that supports multiple drawers.
4+
5+
All drawers are optional, and can be configured individually.
6+
7+
Features:
8+
* drawers on left, right, top and bottom
9+
* swipe to open
10+
* swipe to close
11+
* tap outside to close
12+
* progressively dim main content as the drawer is opened
13+
14+
## Quick Start
15+
16+
```bash
17+
$ npm i --save nativescript-vue-multi-drawer
18+
```
19+
20+
21+
```diff
22+
// main.js
23+
import Vue from 'nativescript-vue'
24+
...
25+
+ import MultiDrawer from 'nativescript-vue-multi-drawer'
26+
+ Vue.use(MultiDrawer)
27+
```
28+
29+
Optionally set default options by passing `options` when installing the plugin:
30+
```js
31+
Vue.use(MultiDrawer, {
32+
// override any option here
33+
// for example enable debug mode
34+
debug: true
35+
})
36+
```
37+
38+
```xml
39+
<MultiDrawer>
40+
<StackLayout slot="left">
41+
<Label text="Im in the left drawer" />
42+
</StackLayout>
43+
<StackLayout slot="right">
44+
<Label text="Im in the right drawer" />
45+
</StackLayout>
46+
<StackLayout slot="top">
47+
<Label text="Im in the top drawer" />
48+
</StackLayout>
49+
<StackLayout slot="bottom">
50+
<Label text="Im in the bottom drawer" />
51+
</StackLayout>
52+
53+
<Frame /> <!-- main content goes into the default slot -->
54+
</MultiDrawer>
55+
```
56+
57+
The component will only enable drawers that have contents in them, so if you only need a left and a right side drawer, you can just remove the top and bottom slots and it will work as expected.
58+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /