Skip to content

usePreferredReducedMotion

类别
导出大小
1.18 kB
最近修改
2 days ago

响应式 prefers-reduced-motion 媒体查询。

🌐 Reactive prefers-reduced-motion media query.

示例

Preferred Motion:
no-preference

用法

🌐 Usage

ts
import { 
usePreferredReducedMotion
} from '@vueuse/core'
const
preferredMotion
=
usePreferredReducedMotion
()

组件用法

🌐 Component Usage

vue
<template>
  <UsePreferredReducedMotion v-slot="{ 
motion
}">
Preferred Reduced Motion: {{
motion
}}
</UsePreferredReducedMotion> </template>