Back to Vueuse

useEyeDropper

packages/core/useEyeDropper/index.md

14.3.0464 B
Original Source

useEyeDropper

Reactive EyeDropper API

Usage

ts
import { useEyeDropper } from '@vueuse/core'

const { isSupported, open, sRGBHex } = useEyeDropper()

Component Usage

vue
<template>
  <UseEyeDropper v-slot="{ isSupported, sRGBHex, open }">
    <button :disabled="!isSupported" @click="() => open()">
      sRGBHex: {{ sRGBHex }}
    </button>
  </UseEyeDropper>
</template>