@consumidor-positivo/ts-utils - v1.21.0
    Preparing search index...

    Interface UseInOutViewObserverOptions

    Options for the useInOutViewObserver hook.

    interface UseInOutViewObserverOptions {
        effectObserver?: any[];
        threshold?: number;
        triggerOnceIn?: boolean;
        triggerOnceOut?: boolean;
    }
    Index

    Properties

    effectObserver?: any[]

    Additional reactive dependencies to include in the useEffect hook. When any of these values change, the IntersectionObserver will be re-created, allowing the hook to respond to dynamic state or prop changes. Default is an empty array (no extra dependencies).

    threshold?: number

    Threshold value between 0 and 1 indicating what percentage of the element should be visible. Default is 0.5 (50%).

    triggerOnceIn?: boolean

    If true, the callback will only be triggered once when the element enters the viewport. Default is false.

    triggerOnceOut?: boolean

    If true, the callback will only be triggered once when the element leaves the viewport. Default is false.