Animation
Spring easing toggle
Spring easing toggle: A tile that slides between two stops on a spring curve baked into a plain CSS transition, with the generated curve plotted beside it.
Using Spring easing toggle
Spring easing toggle uses the card preview frame with a light/dark theme setting.
Customize the preview
These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.
| Control | Type | Default | Preview limits |
|---|---|---|---|
bounce | number | 0.4 | From 0 to 0.9; step 0.05 |
duration | number | 0.6 | From 0.2 to 2; step 0.1 |
accent | color | #38BDF8 | No additional limit in the metadata. |
showCurve | boolean | true | No additional limit in the metadata. |
spin | boolean | true | No additional limit in the metadata. |
Which frameworks are available for Spring easing toggle?
Spring easing toggle is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.
What does Spring easing toggle depend on?
The React metadata lists these npm dependencies beyond React: motion, clsx.
What accessibility details are visible in Spring easing toggle?
The React source for Spring easing toggle includes: native elements (button); attributes and handlers (aria-hidden, aria-pressed). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Spring easing toggle handle reduced motion?
Spring easing toggle reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: dur: reduce ? 0.15 : clampedDuration; ease: reduce ? "linear" : toEasing(curve.samples). Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.