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>
1.4 KiB
1.4 KiB
category
| category |
|---|
| Component |
unrefElement
Retrieves the underlying DOM element from a Vue ref or component instance
Usage
<script setup lang="ts">
import { unrefElement } from '@vueuse/core'
import { onMounted, useTemplateRef } from 'vue'
const div = useTemplateRef('div') // will be bound to the <div> element
const hello = useTemplateRef('hello') // will be bound to the HelloWorld Component
onMounted(() => {
console.log(unrefElement(div)) // the <div> element
console.log(unrefElement(hello)) // the root element of the HelloWorld Component
})
</script>
<template>
<div ref="div" />
<HelloWorld ref="hello" />
</template>
Type Declarations
export type VueInstance = ComponentPublicInstance
export type MaybeElementRef<T extends MaybeElement = MaybeElement> = MaybeRef<T>
export type MaybeComputedElementRef<T extends MaybeElement = MaybeElement> =
MaybeRefOrGetter<T>
export type MaybeElement =
| HTMLElement
| SVGElement
| VueInstance
| undefined
| null
export type UnRefElementReturn<T extends MaybeElement = MaybeElement> =
T extends VueInstance ? Exclude<MaybeElement, VueInstance> : T | undefined
/**
* Get the dom element of a ref of element or Vue component instance
*
* @param elRef
*/
export declare function unrefElement<T extends MaybeElement>(
elRef: MaybeComputedElementRef<T>,
): UnRefElementReturn<T>