angular-popper
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

angular-popper

Build Status npm version npm

Popover component for Angular 2+ based on Popper.js library.

Demo

Instalation

  • Angular CLI > v6.0.0: ng add angular-popper

  • yarn: yarn add popper.js angular-popper

  • npm: npm install --save popper.js angular-popper

Usage

Import NgxPopper module

...
import { NgxPopper } from 'angular-popper';
 
@NgModule({
  ...
  imports[
    NgxPopper
  ]
  ..
})
export class AppModule {}

Use in template

<angular-popper>
  <div class="target-block border border-primary">
    Target
  </div>
 
  <div content>Popper content</div>
</angular-popper>

Input properties

show: boolean

Default: true

Specify if popper visible.

target?: string | Element

Specify popper element target, accepts HTMLElement reference or CSS selector.

closeButton: boolean

Default: false

Specify if popper should contain close button.

placement: Popper.Placement

Default: 'bottom'

Specify popper placement.

positionFixed: boolean

Default: false

Specify if popper should has fixed position.

eventsEnabled: boolean

Default: true

Specify if popper should listen for scroll & resize events.

modifiers?: Popper.Modifiers

Popper.js modifiers object, details.

Events

close

Fires on popper close button click.

Package Sidebar

Install

npm i angular-popper

Weekly Downloads

2,261

Version

2.0.1

License

MIT

Unpacked Size

122 kB

Total Files

35

Last publish

Collaborators

  • bobrov1989