1.2.0 • Published 2 years ago

exposure-ts v1.2.0

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

Installation

NPM

npm install exposure-ts --save

Yarn

yarn add exposure-ts

Constructor Options

NameTypeDefaultDescription
rootStringnullMDN
rootMarginString"0px"MDN
thresholdNumber[]0MDN
onceBooleanfalseOpen only one exposure
import { Exposure } from "exposure-ts";

new Exposure({
  threshold: 0.5,
  one: false,
});

Methods

add(options)

  • options
    • Type: Object
    • Properties:
      • el: Tells the IntersectionObserver a target element to observe.
      • trackData: The return value used to trigger the visibility callback
      • callback: When the observer fires the visibility trigger callback
1.2.0

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago