createReducedMotionConfig
Returns an Accessor<boolean | null> that resolves the nearest MotionConfig's
reducedMotion setting against the OS-level prefers-reduced-motion query:
'never'returnsfalse'always'returnstrue'user'(or no override) returns the OS preference
import { createReducedMotionConfig, motion } from 'motion-solidjs'
function Card() {
const shouldReduce = createReducedMotionConfig()
return <motion.div animate={{ x: 100 }} transition={{ duration: shouldReduce() ? 0 : 0.6 }} />
}
Use this primitive when you need to read the resolved preference inside a component. To set the
mode, render a <MotionConfig reducedMotion="..."> higher in the tree.
reduced motion: no