https://github.com/xiaojundebug/ngx-sticky
An angular sticky component.
https://github.com/xiaojundebug/ngx-sticky
angular ng sticky
Last synced: about 2 months ago
JSON representation
An angular sticky component.
- Host: GitHub
- URL: https://github.com/xiaojundebug/ngx-sticky
- Owner: xiaojundebug
- Created: 2020-06-05T10:29:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T18:51:02.000Z (over 3 years ago)
- Last Synced: 2025-03-27T01:48:13.978Z (over 1 year ago)
- Topics: angular, ng, sticky
- Language: TypeScript
- Homepage: https://xiaojundebug.github.io/ngx-sticky/
- Size: 4.98 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NgxSticky
An angular sticky component.
_development environment: angular 8.2.14_
👉 [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 |