Motion that feels the same everywhere
Duration tokens, easing curves, springs, and presets that respect reduced motion. Optional loaders keep the motion library light.
Duration tokens
duckMotionDurationMs.fastis 150 ms,.normalis 200 ms, and.slowis 300 ms. Every animated component shares the same timing.Easing curves
duckMotionEasing.standard,.exit,.expo,.easeOut, and.spring. Cubic-bezier curves tuned for UI motion.Reduced motion
useDuckReducedMotion()andmotionTransition()drop durations to zero when the user opts out. Your code stays the same.Presets
Tree-shakeable
fadeIn,scaleIn, andslideUp, plus blur and asymmetric-exit variants. Pick one and drop it in.Springs
springDefault,springSnappy, andspringGentle. Pass them straight to the motion library.Feature loaders
MotionProvider,LazyMotionfeature loaders, anduseMotionPreset(). Load only the features you use.
Install
Install the package and import the tokens, presets, and reduced-motion helpers.
Install
bun add @gentleduck/motionImport the helpers
import { motionTransition, useDuckReducedMotion } from '@gentleduck/motion'
Free & open source
gentleduck is MIT licensed and will always be free and open source. Every package ships with full source access — fork it, modify it, own it.