Skip to main content
WIP

Duck Motion

Animation tokens, easing presets, spring configs, and reduced-motion helpers. Optional feature loaders for the motion library.

A11y by default

Motion that respects reduced-motion by default

Tokens, springs, and reduced-motion helpers. Every animation you compose reads the OS accessibility preference and drops duration to zero when it is set.

Duration tokens

`duckDuration.fast` (150 ms), `.normal` (200 ms), `.slow` (300 ms). Consistent timing across every animated component.

Easing presets

`duckEasing.standard` and `.spring`. Reusable cubic-bezier and spring curves tuned for UI motion.

Reduced motion

`useDuckReducedMotion()` and `motionTransition()` drop durations to zero when the user opts out. Same API either way.

Animation presets

Tree-shakeable `fadeIn`, `scaleIn`, `slideUp`, plus blur and asymmetric-exit variants. Pick one, drop it in.

Spring transitions

`duckSpringDefault`, `.snappy`, `.gentle`. Pass them straight to the motion library.

Motion library integration

`MotionProvider`, `LazyMotion` feature loaders, `useMotionPreset()`. Load only the features you use.

Install

Use the tokens, presets, and reduced-motion helpers.

# Install
bun add @gentleduck/motion

# Respect reduced-motion by default
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.

Become a Sponsor