Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

An angular sticky component.
https://github.com/xiaojundebug/ngx-sticky

angular ng sticky

Last synced: 21 days ago
JSON representation

An angular sticky component.

Awesome Lists containing this project

README

        

# NgxSticky

An angular sticky component.

_development environment: angular 8.2.14_


travis

👉 [Demo](https://stackblitz.com/edit/ngx-sticky-demo)

## Install

```bash
npm i @ciri/ngx-sticky
```

## Quick Start

Add it to your module:

```typescript
import { StickyModule } from '@ciri/ngx-sticky'

@NgModule({
// ...
imports: [
// ...
StickyModule
],
})
```

Add to view:

```html
hello world
```

## 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 |