@kovalenko/swipe-sidenav
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

SwipeSidenav

Adds swipe functionality to material sidenav or drawer

Installation

npm install @kovalenko/swipe-sidenav

Usage

Extend your component from SwipeableSidenav. In template, add #drawer export to sidenav or drawer and [@.disabled]="disableAnimation" to the container.

import {Component} from '@angular/core';
import {SwipeableSidenav} from '@kovalenko/swipe-sidenav';

@Component({
  selector: 'app',
  template: `
    <mat-drawer-container [@.disabled]="disableAnimation">
      <mat-drawer #drawer>mat-drawer-content</mat-drawer>
    </mat-drawer-container>
  `,
})
export class AppComponent extends SwipeableSidenav {
  constructor() {
    super();
  }

}

License

MIT

Package Sidebar

Install

npm i @kovalenko/swipe-sidenav

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

98.4 kB

Total Files

10

Last publish

Collaborators

  • kovalenko