Pulled ALL skills from 15 source repositories: - anthropics/skills: 16 (docs, design, MCP, testing) - obra/superpowers: 14 (TDD, debugging, agents, planning) - coreyhaines31/marketingskills: 25 (marketing, CRO, SEO, growth) - better-auth/skills: 5 (auth patterns) - vercel-labs/agent-skills: 5 (React, design, Vercel) - antfu/skills: 16 (Vue, Vite, Vitest, pnpm, Turborepo) - Plus 13 individual skills from various repos Mosaic Stack is not limited to coding — the Orchestrator and subagents serve coding, business, design, marketing, writing, logistics, analysis, and more. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
72 lines
1.4 KiB
Markdown
72 lines
1.4 KiB
Markdown
---
|
|
category: Browser
|
|
---
|
|
|
|
# useEyeDropper
|
|
|
|
Reactive [EyeDropper API](https://developer.mozilla.org/en-US/docs/Web/API/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>
|
|
```
|
|
|
|
## Type Declarations
|
|
|
|
```ts
|
|
export interface EyeDropperOpenOptions {
|
|
/**
|
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
|
*/
|
|
signal?: AbortSignal
|
|
}
|
|
export interface EyeDropper {
|
|
new (): EyeDropper
|
|
open: (options?: EyeDropperOpenOptions) => Promise<{
|
|
sRGBHex: string
|
|
}>
|
|
[Symbol.toStringTag]: "EyeDropper"
|
|
}
|
|
export interface UseEyeDropperOptions {
|
|
/**
|
|
* Initial sRGBHex.
|
|
*
|
|
* @default ''
|
|
*/
|
|
initialValue?: string
|
|
}
|
|
/**
|
|
* Reactive [EyeDropper API](https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper_API)
|
|
*
|
|
* @see https://vueuse.org/useEyeDropper
|
|
*
|
|
* @__NO_SIDE_EFFECTS__
|
|
*/
|
|
export declare function useEyeDropper(options?: UseEyeDropperOptions): {
|
|
isSupported: ComputedRef<boolean>
|
|
sRGBHex: ShallowRef<string, string>
|
|
open: (openOptions?: EyeDropperOpenOptions) => Promise<
|
|
| {
|
|
sRGBHex: string
|
|
}
|
|
| undefined
|
|
>
|
|
}
|
|
export type UseEyeDropperReturn = ReturnType<typeof useEyeDropper>
|
|
```
|