@gentleduck/motion
v0.1.18
Published
Motion primitives for gentleduck/ui components.
Maintainers
Readme
@gentleduck/motion
A lightweight motion toolkit for gentleduck/ui packages.
It's for gentleduck internal use only
Installation
bun add @gentleduck/motionAPI
@gentleduck/motion/css- Motion tokens (
--duck-motion-ease,--duck-motion-dur) - Global
prefers-reduced-motionfallback policy
- Motion tokens (
tokensduckEasingduckDurationduckMotionCssVar
reactuseDuckReducedMotion()motionTransition(reduced, normal)onDuckReducedMotionChange(callback)
waapiprefersReducedMotion()animateIfAllowed(element, keyframes, options, reducedMotion?)
motionanimateIn(element, keyframes?, options?)motion(named alias for backward compatibility)
Contributing
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
