@atlaskit/motion
Version:
A set of utilities to apply motion in your application.
34 lines (33 loc) • 1.29 kB
TypeScript
/**
* Use for any programatic motions needed at runtime.
* Will return `true` if the current user prefers reduced motion.
* This is generally set through OS preferences/settings.
*/
export declare const isReducedMotion: () => boolean;
/**
* A React hook version of {@link isReducedMotion}.
* Useful for React components that need to re-render if the user's motion
* preference changes at runtime.
*/
export declare const useIsReducedMotion: () => boolean;
/**
* Use for any CSS based motion (animation or transition).
* Always put at the end of your declaration for correct use of the cascade.
* Reduced motion preference is generally set through OS preferences/settings.
*/
export declare const reduceMotionAsPerUserPreference: {
readonly '@media (prefers-reduced-motion: reduce)': {
readonly animation: "none";
readonly transition: "none";
};
};
/**
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-4709 Internal documentation for deprecation (no external access)}
* Use the sibling export `reduceMotionAsPerUserPreference` instead.
*/
export declare const prefersReducedMotion: () => {
readonly '@media (prefers-reduced-motion: reduce)': {
readonly animation: "none";
readonly transition: "none";
};
};