vueuse-components-skilld
Skill184 starsChanged 37 days agoMITView on GitHub
Renderless components and directives from @vueuse/components 15.x (VueUse). Use when writing, converting, or debugging code that imports @vueuse/components, using Use*/On* components or v* directives in Vue 3 templates, or mapping VueUse composables to component or directive usage. Provides props, slot data shapes, emits, directive binding syntax, and version limits.
- Installs packages
In this repository35 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- floating-ui-vue-skilldSkill
- formkit-core-skilldSkill
- motion-v-skilldSkill
- pinia-colada-skilldSkill
- pinia-skilldSkill
- primevue-skilldSkill
- quasar-skilldSkill
- reka-ui-skilldSkill
- shadcn-vue-skilldSkill
- slidev-cli-skilldSkill
- tanstack-ai-vue-skilldSkill
- tanstack-vue-form-skilldSkill
- tanstack-vue-query-skilldSkill
- tanstack-vue-router-skilldSkill
- tanstack-vue-store-skilldSkill
- tanstack-vue-table-skilldSkill
- tanstack-vue-virtual-skilldSkill
- tresjs-core-skilldSkill
- unhead-vue-skilldSkill
- unovis-ts-skilldSkill
- unovis-vue-skilldSkill
- vee-validate-skilldSkill
- vitepress-skilldSkill
- vue-data-ui-skilldSkill
- vue-i18n-skilldSkill
- vue-router-skilldSkill
- vue-skilldSkill
- vue-test-utils-skilldSkill
- vuetify-skilldSkill
- vueuse-core-skilldSkill
- vueuse-integrations-skilldSkill
- vueuse-math-skilldSkill
- vueuse-motion-skilldSkill
- vueuse-shared-skilldSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Pure renderless: no DOM of their own, render only the default slot, scoped slot receives the reactive composable return.
- Distinctive: line 29
All others are pure renderless.
- Very specific: line 94
Import components and directives as named exports from @vueuse/components.
- Very specific: line 102
Do not use the deprecated exports VOnClickOutside and VOnLongPress.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
@vueuse/components 15.0.0
Renderless component and directive wrappers around @vueuse/core composables. 46 components, 14 directives, 2 deprecated directive aliases (dist/index.js:1237).
Facts (all citations are paths inside the prepared @vueuse/components package):
- Version 15.0.0 (package.json:4); depends on
@vueuse/core15.0.0 and@vueuse/shared15.0.0 (package.json:43-44) - Peer dependency:
vue^3.5.0(package.json:40) - Node.js
>=22(package.json:37); Node 20 support was dropped in v15 - ESM-only (
"type": "module", package.json:3); no CJS build sideEffects: false, tree-shakeable (package.json:22); IIFE bundle exposed for CDN viaunpkg/jsdelivr(package.json:30-31)- Install:
npm i @vueuse/components @vueuse/core(README.md:10, https://vueuse.org/guide/components)
How the components work
Two families, decided by what they render (verified in dist/index.js):
- Pure renderless: no DOM of their own, render only the default slot, scoped slot receives the reactive composable return. Example
UseMouse(dist/index.js:805-809). - Element wrapper: render one element (
props.as || "div") whose ref feeds the composable, slot content becomes children. The element is the composable's target. ExampleUseElementBounding(dist/index.js:340-345).
Element-wrapper components: OnClickOutside, OnLongPress, UseDraggable, UseElementBounding, UseElementOverflow, UseElementSize, UseElementVisibility, UseFullscreen, UseImage (renders img when no default slot), UseMouseInElement, UseMousePressed, UsePointerLock, UseScreenSafeArea, UseVirtualList (own container/wrapper divs).
All others are pure renderless. Full catalog with props, slot data, and emits: references/components.md.
Common tasks
Mouse position (official guide pattern, https://vueuse.org/guide/components):
<template>
<UseMouse v-slot="{ x, y }">
x: {{ x }} y: {{ y }}
</UseMouse>
</template>Dark mode toggle; note UseDark slot data is { isDark, toggleDark } (dist/index.js:173-178):
<template>
<UseDark v-slot="{ isDark, toggleDark }">
<button @click="toggleDark()">Is Dark: {{ isDark }}</button>
</UseDark>
</template>Outside click, component style. OnClickOutside takes an options prop and emits trigger; the rendered div is the target (dist/index.js:5-17):
<OnClickOutside :options="{ ignore: [ignoreElRef] }" @trigger="close">
<div>Click outside of me</div>
</OnClickOutside>Directive style, with the [handler, options] tuple binding (dist/index.js:26-29):
<script setup>
import { vOnClickOutside } from '@vueuse/components'
</script>
<template>
<div v-if="modal" v-on-click-outside="[closeModal, { ignore: [ignoreElRef] }]">
Hello World
</div>
</template>Image with loading and error slots (dist/index.js:763-770):
<UseImage src="https://place.dog/300/200">
<template #loading>Loading..</template>
<template #error>Failed</template>
</UseImage>Draggable with persisted position; storage-key enables useStorage persistence, storage-type picks local (default) or session (dist/index.d.ts:157-168, dist/index.js:286-300):
<UseDraggable storage-key="panel-pos" :initial-value="{ x: 10, y: 10 }" v-slot="{ x, y, style }">
<div :style="style">Drag me at {{ x }}, {{ y }}</div>
</UseDraggable>Rules to apply
- Import components and directives as named exports from
@vueuse/components. There is noapp.use()plugin; register globally yourself if needed (app.component('UseMouse', UseMouse)). - In
On*components, pass configuration through theoptionsprop and react through the@triggeremit, not through handler props (dist/index.js:15-16, 66-68). - On element-wrapper components, set
asto change the rendered element, e.g.as="section"(dist/index.js:11). Exception:UseScreenSafeAreatypes declareasbut its runtime props array omits it, so it always renders adiv(dist/index.js:1096-1101 vs dist/index.d.ts:548-553). UseIdlerequires thetimeoutprop (dist/index.d.ts:297-299).UseVirtualListrequireslistandoptionsprops;heightdefaults to300px; it exposesscrollTo(index)via template ref (dist/index.d.ts:590-610, dist/index.js:1190-1206).UseObjectUrlrenders its slot only after the object URL exists; slot prop is the URL string (dist/index.js:906-915).UseOffsetPaginationemitspage-change,page-size-change,page-count-changewith the full pagination state (dist/index.js:918-951).UsePointeracceptstarget="window"(default) ortarget="self"(dist/index.d.ts:463-465, dist/index.js:976-984).- Do not use the deprecated exports
VOnClickOutsideandVOnLongPress; they aliasvOnClickOutside/vOnLongPress(dist/index.d.ts:17-18, 43-44). - Directive binding values: a handler function, or a
[handler, options]tuple;vElementSizetakes[handler, initialSize, options]andvScrollLocktakes a boolean. Details and modifiers: references/directives.md.
References
- references/components.md — catalog of all 46 components: props, slot data shapes, emits, rendered element
- references/directives.md — all 14 directives: binding value forms, modifiers, handler payloads
- references/migration.md — version-specific changes v13 to v15 with official release URLs
Official documentation: https://vueuse.org/guide/components
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

