Skip to content

usePreferredContrast

Category
Export Size
354 B
Last Changed
5 days ago

Reactive prefers-contrast media query

Demo

Usage

tsx
import { 
usePreferredContrast
} from '@reause/core'
const
contrast
=
usePreferredContrast
() // 'more' | 'less' | 'custom' | 'no-preference'

Type Declarations

ts
export type ContrastType = 'more' | 'less' | 'custom' | 'no-preference'

export function usePreferredContrast(options?: ConfigurableWindow): ContrastType

Source

Source · Demo · VueUse

Contributors

hairyf

Changelog

No recent changes

Released under the MIT License. v0.1.8