Category | Browser |
---|---|
Export Size | 557 B |
Last Changed | 9 months ago |
Reactive prefers-reduced-motion media query.
import { usePreferredReducedMotion } from '@vueuse/core' const preferredMotion = usePreferredReducedMotion()
This function also provides a renderless component version via the
@vueuse/components
package. Learn more about the usage.
<UsePreferredReducedMotion v-slot="{ motion }"> Preferred Reduced Motion: {{ motion }} </UsePreferredReducedMotion>
export type ReducedMotionType = "reduce" | "no-preference" /** * Reactive prefers-reduced-motion media query. * * @see https://vueuse.org/usePreferredReducedMotion * @param [options] */ export declare function usePreferredReducedMotion( options?: ConfigurableWindow ): ComputedRef<ReducedMotionType>
© 2019-present Anthony Fu
Licensed under the MIT License.
https://vueuse.org/core/usePreferredReducedMotion/