Device Light:
null

useDeviceLight

Reactive DeviceLightEvent. Provide web developers with information from photo sensors or similar detectors about ambient light levels near the device. For example, this may be useful to adjust the screen's brightness based on the current ambient light level in order to save energy or provide better readability.

Usage

import { useDeviceLight } from '@vueuse/core'

const light = useDeviceLight()
StateTypeDescription
lightNumberThe level of the ambient light in lux.

Type Declarations

/**
 * Reactive DeviceLightEvent.
 *
 * @see   {@link /useDeviceLight}
 * @param options
 */
export declare function useDeviceLight({
  window,
}?: ConfigurableWindow): Ref<number | null>

Source

SourceDemoDocs