@ciri/ngx-sticky
v0.0.2
Published
An angular sticky component.
Downloads
11
Readme
NgxSticky
An angular sticky component.
development environment: angular 8.2.14
👉 Demo
Install
npm i @ciri/ngx-sticky
Quick Start
Add it to your module:
import { StickyModule } from '@ciri/ngx-sticky'
@NgModule({
// ...
imports: [
// ...
StickyModule
],
})
Add to view:
<ngx-sticky [offsetTop]="0">hello world</ngx-sticky>
Inputs
| Name | Type | Default | Description | | --------- | ------ | ------- | ------------------------- | | offsetTop | number | 0 | Offset top | | zIndex | number | 1 | Equivalent to css z-index |
Outputs
| Event | Description | Return value | | ------ | --------------------------- | ------------ | | change | Triggered when state change | state |