New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ng-panel-js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-panel-js

Swipe card module written in Angular. This components replicates the material design bottom sheet component.

latest
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

PanelJS

Swipe card module written in Angular. This components replicates the material design bottom sheet component.

Using in Angular

  • Install PanelJS and HammerJS
npm i ng-panel-js hammerjs
  • Import the module into the main app module
...
import { PanelJsModule, PanelJsService, PanelJSConfig } from 'panel-js';

const panelJSConfig: PanelJSConfig = {
  stage0: 0.3,
  stage1: 0.8,
  persistent: false,
}

@NgModule({
  ...,
  imports: [
    ...,
    PanelJsModule.forRoot(panelJSConfig),
  ],
  providers: [
    ...,
    PanelJsService
  ]
})
export class AppModule {  }

  • Use the component on the page
<panel-js>
  <mat-card></mat-card>
</panel-js>

The body containing the panel must be set to position fixed

body {
  margin: 0;
  width: 100%;
  height: 100%;
  position: fixed;
}

If the panel module is configured as persistent it will be displayed on the page and cannot be swipped away. If the panel is not persistent it will by default not be on the page, you can trigger it with the toggle() method.

Native Web component - coming soon

FAQs

Package last updated on 18 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts