UNPKG

motion-v

Version:

<p align="center"> <img width="100" height="100" alt="Motion logo" src="https://user-images.githubusercontent.com/7850794/164965523-3eced4c4-6020-467e-acde-f11b7900ad62.png" /> </p> <h1 align="center">Motion for Vue</h1>

26 lines (25 loc) 901 B
import { Variant, VariantLabels } from '../../../types'; type MarginValue = `${number}${'px' | '%'}`; type MarginType = MarginValue | `${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`; export interface InViewOptions { root?: Element | Document; margin?: MarginType; amount?: 'some' | 'all' | number; } type ViewportEventHandler = (entry: IntersectionObserverEntry | null) => void; export interface InViewProps { inViewOptions?: InViewOptions & { once?: boolean; }; /** * @deprecated Use `whileInView` instead. */ inView?: VariantLabels | Variant; /** * Variant to apply when the element is in view. */ whileInView?: VariantLabels | Variant; onViewportEnter?: ViewportEventHandler; onViewportLeave?: ViewportEventHandler; } export {};