UNPKG

@humanspeak/svelte-motion

Version:

A lightweight animation library for Svelte 5 that provides smooth, hardware-accelerated animations. Features include spring physics, custom easing, and fluid transitions. Built on top of the motion library, it offers a simple API for creating complex anim

9 lines (8 loc) 246 B
import { getContext, setContext } from 'svelte'; const key = 'motionConfig'; export const getMotionConfig = () => { return getContext(key); }; export const createMotionConfig = (motionConfig) => { return setContext(key, motionConfig); };