MCPcopy Create free account
hub / github.com/adobe/react-spectrum / reduceMotion

Function reduceMotion

packages/react-aria-components/src/Sheet.tsx:1107–1109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1105});
1106
1107function reduceMotion() {
1108 return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
1109}
1110
1111function scrollAlongAxis(element: HTMLElement, axis: Axis, value: number, smooth = false) {
1112 let behavior: ScrollBehavior | undefined = smooth && !reduceMotion() ? 'smooth' : undefined;

Callers 2

scrollAlongAxisFunction · 0.85
scrollDetentIntoViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected