Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 878 Bytes

File metadata and controls

22 lines (15 loc) · 878 Bytes

IntersectionDetector

Usage

To use IntersectionDetector, you can import the component from the @dhis2/ui library

import { IntersectionDetector } from '@dhis2/ui'

Props

Name Type Default Required Description
rootRef {
"current": "instanceOf(HTMLElement)"
}
* React ref on other component to detect intersections with
onChange function * Called with signature ({ isIntersecting: bool })
children any
className string
dataTest string 'dhis2-uicore-intersectiondetector'
threshold number 0 The threshold value: a value from 0.0 to 1.0 that controls the point at which an intersecting component is considered 'intersected' or 'visible' and the onChange callback triggers