Skip to content

Commit

Permalink
docs(SidebarJS): component api
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzodianni committed Mar 13, 2018
1 parent 11ea31f commit f77a5b6
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,40 @@ npm install ng-sidebarjs --save
## Demo
*Open the demo on your device and try the touch gestures!*

* [Simple Demo](https://embed.plnkr.co/Thv7HW/)
* [Simple Demo](https://stackblitz.com/edit/angular-skpdxr)

## Options
```html
<sidebar-js
// Optional | Required only for multiple sidebarjs
[sidebarjsName]="'myCustomName'"

// Optional
[sidebarjsConfig]="{
// Minimum swipe in px required to trigger listener: open
documentMinSwipeX?: 10,
// Range in px where document is listening for gesture: open
documentSwipeRange?: 40,
// Open and close sidebar with swipe gestures
nativeSwipe?: true,
// Enable/Disable open on swipe
nativeSwipeOpen?: true,
// Sidebar position, accepted values: left|right
position?: 'left',
// Backdrop opacity on sidebar open
backdropOpacity?: 0.3,
}"

// Optional | Function called after sidebar is open
(open)="onOpenSidebar()"

// Optional | Function called after sidebar is close
(close)="onCloseSidebar()"

// Optional | Function called when sidebar change visibility
(changeVisibility)="onChangeVisibility($event)">
</sidebar-js>
```

## Implementation
### Import Module
Expand Down

0 comments on commit f77a5b6

Please sign in to comment.