Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Apply VueUse composables in Vue 3/Nuxt projects to replace custom implementations with battle-tested utilities.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/usePreferredReducedMotion.md
1---2category: Browser3---45# usePreferredReducedMotion67Reactive [prefers-reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion) media query.89## Usage1011```ts12import { usePreferredReducedMotion } from '@vueuse/core'1314const preferredMotion = usePreferredReducedMotion()15```1617## Component Usage1819```vue20<template>21<UsePreferredReducedMotion v-slot="{ motion }">22Preferred Reduced Motion: {{ motion }}23</UsePreferredReducedMotion>24</template>25```2627## Type Declarations2829```ts30export type ReducedMotionType = "reduce" | "no-preference"31/**32* Reactive prefers-reduced-motion media query.33*34* @see https://vueuse.org/usePreferredReducedMotion35* @param [options]36*37* @__NO_SIDE_EFFECTS__38*/39export declare function usePreferredReducedMotion(40options?: ConfigurableWindow,41): ComputedRef<ReducedMotionType>42```43