motion-v
Version:
<h1 align="center"> <img width="35" height="35" alt="Motion logo" src="https://github.com/user-attachments/assets/00d6d1c3-72c4-4c2f-a664-69da13182ffc" /><br />Motion for Vue</h1>
27 lines (26 loc) • 1.03 kB
TypeScript
import { MotionNodeOptions } from 'motion-dom';
export type SupportedEdgeUnit = 'px' | 'vw' | 'vh' | '%';
export type EdgeUnit = `${number}${SupportedEdgeUnit}`;
export type NamedEdges = 'start' | 'end' | 'center';
export type EdgeString = NamedEdges | EdgeUnit | `${number}`;
export type Edge = EdgeString | number;
export type ProgressIntersection = [number, number];
export type Intersection = `${Edge} ${Edge}`;
/**
* Scroll offset definition for useScroll.
* Public value export (const presets) lives in value/scroll/offsets.ts.
*/
export type ScrollOffset = Array<Edge | Intersection | ProgressIntersection>;
export interface ScrollInfoOptions {
container?: HTMLElement;
target?: Element;
axis?: 'x' | 'y';
offset?: ScrollOffset;
/**
* When true, enables per-frame checking of scrollWidth/scrollHeight
* to detect content size changes and recalculate scroll progress.
* @default false
*/
trackContentSize?: boolean;
}
export type $Transition = MotionNodeOptions['transition'];