1.0.8 • Published 3 years ago

ngx-cxl-popover v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

NgxCxlPopover

npm version example workflow

The best popover package because it's easy to use and customizable .

Installation

You can use either the npm command-line tool to install packages.

NPM

npm i ngx-cxl-popover

Usage ⁉

  • import NgxCxlPopoverModule module
@NgModule({
  imports: [
   /* .... */
   NgxCxlPopoverModule
   /* .... */
  ],
})
  • add directive ngxCxlPopover on the element.
  • write your awesome title popoverTitle.
  • write your awesome content popoverContent.
<h1 ngxCxlPopover popoverTitle="Hello" popoverContent="👋">Hello</h1>

if you want use customized templates for the title and content then let's go to the next level 👍

Advanced

Custom Templates

<h1
  ngxCxlPopover
  popoverTitle="Hello"
  popoverContent="👋"
  [titleTemplate]="titleTemplate"
  [contentTemplate]="contentTemplate"
>
  Hello
</h1>

<!-- Custom Templates -->
<ng-template #titleTemplate>
  <img src="..." alt="..." />
  <p>...</p>
</ng-template>

<ng-template #contentTemplate>
  <img src="..." alt="..." />
  <p>...</p>
</ng-template>
<!--  -->

Options

AttributeTypeDescriptionDefault
enableScrollbooleanenable scrolling into popover contentfalse
scrollSpeednumberthe speed of scrolling between 10 and 10010
widthnumberset popover fixed width200px
heightnumberset popover fixed height300px
popoverTitlestringwrite the title phasenull
popoverContentstringwrite the content phasenull
titleTemplateTemplateRefreference to the custom title templatenull
contentTemplateTemplateRefreference to the custom content templatenull
placementHorizontalnumberforce popover to show in specific direction and has options 'right' , 'left' , nullnull
placementVerticalnumberforce popover to show in specific direction and has options 'top' , 'bottom' , null;null
animationbooleanenable animationtrue
animationDelaynumberchange animation time in milliseconds100

Customize Style

.ngx-cxl-popover-container {
}
.ngx-cxl-popover-container .ngx-cxl-popover-title {
}
.ngx-cxl-popover-container .ngx-cxl-popover-content {
}

Simplest and Easiest 👌💖👏

Contribution

I welcome you to fork and add more features into it. If you have any bugs or feature request, please create an issue at github repository.

License

MIT

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago