@humanspeak/svelte-motion
Version:
Framer Motion for Svelte 5. Declarative motion.<tag> components with AnimatePresence exit animations, gestures (hover, tap, drag, focus, in-view), variants, FLIP layout animations, shared-layout transitions, spring physics, and scroll-linked motion values
15 lines (14 loc) • 619 B
TypeScript
import type { MotionConfigProps } from '../types.js';
/**
* Retrieve the current motion configuration from Svelte component context.
*
* @returns The active `MotionConfigProps`, or `undefined` if none was set by a parent.
*/
export declare const getMotionConfig: () => MotionConfigProps | undefined;
/**
* Provide motion configuration to descendant components via Svelte context.
*
* @param motionConfig The configuration to propagate (e.g. `transition`).
* @returns The same `MotionConfigProps` that was set.
*/
export declare const createMotionConfig: (motionConfig: MotionConfigProps) => MotionConfigProps;