xiaojundebug / ngx-sticky

An angular sticky component.

Home Page:https://xiaojundebug.github.io/ngx-sticky/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NgxSticky

An angular sticky component.

development environment: angular 8.2.14

travis

👉 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

About

An angular sticky component.

https://xiaojundebug.github.io/ngx-sticky/


Languages

Language:TypeScript 72.1%Language:JavaScript 18.7%Language:HTML 7.0%Language:CSS 2.1%