К основному содержанию
скилл CX Codex

vueuse-components-skilld — скилл для Claude Code: функции и установка

Скилл vueuse-components-skilld помогает писать и отлаживать Vue 3-шаблоны с компонентами и директивами @vueuse/components. Пригодится и при переходе от composable к компонентной или директивной форме.

MIT 168 установок ★ 186 обновлён 2026-10-10

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add skilld-dev/vue-ecosystem-skills --skill vueuse-components-skilld -a claude-code
Открыть на GitHub

Что делает vueuse-components-skilld

Скилл описывает компоненты-обёртки над composable из @vueuse/core и директивы @vueuse/components: их props, данные слотов, события и формат привязки. Он помогает выбрать подходящую форму для шаблона и разобраться, какой элемент создаёт компонент. Одни компоненты выводят только слот, другие оборачивают его элементом.

В справке есть примеры для UseMouse, UseDark, OnClickOutside, UseImage и UseDraggable. Также разобраны обязательные props UseIdle и UseVirtualList, а для директив — допустимые значения привязки. Пакет рассчитан на Vue ^3.5.0 и Node.js >=22; версии Vue и Node нужно сверить с проектом. Скилл отдельно предупреждает, что VOnClickOutside и VOnLongPress — устаревшие экспорты.

Какие задачи решает

  • показать координаты указателя через UseMouse
  • переключать тёмную тему через UseDark
  • обрабатывать щелчок вне компонента
  • передавать composable в Vue-шаблон через компонент или директиву
  • проверить props и данные слотов компонента VueUse

Примеры запросов агенту

  • Покажи координаты указателя в шаблоне Vue с помощью UseMouse.
  • Добавь закрытие модального окна при щелчке снаружи через OnClickOutside.
  • Проверь, какие props нужны UseVirtualList и как вызвать scrollTo(index).

Как установить vueuse-components-skilld

1Через Skills CLI (Vercel)

npx skills add skilld-dev/vue-ecosystem-skills --skill vueuse-components-skilld -a claude-code

2Вручную: положить файлы

~/.claude/skills/vueuse-components-skilld/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/vueuse-components-skilld/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о vueuse-components-skilld

Как установить vueuse-components-skilld в Claude Code?

Выполните npx skills add skilld-dev/vue-ecosystem-skills --skill vueuse-components-skilld -a claude-code. Файл скилла находится по пути ~/.claude/skills/vueuse-components-skilld/SKILL.md.

Что делает vueuse-components-skilld?

Помогает использовать компоненты и директивы @vueuse/components в Vue 3: разобраться в props, слотах, событиях и синтаксисе директив.

Какие версии Vue и Node.js нужны для @vueuse/components?

Пакет требует Vue ^3.5.0 и Node.js >=22. В версии 15 поддержка Node 20 прекращена.

Исходный текст

SKILL.md · MIT
---
name: vueuse-components-skilld
description: 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.
license: MIT
---

# @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/core` 15.0.0 and `@vueuse/shared` 15.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 via `unpkg`/`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):

1. **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).
2. **Element wrapper**: render one element (`props.as || "div"`) whose ref feeds the composable, slot content becomes children. The element is the composable's target. Example `UseElementBounding` (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](./references/components.md).

## Common tasks

Mouse position (official guide pattern, https://vueuse.org/guide/components):

```vue
<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):

```vue
<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):

```vue
<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):

```vue
<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):

```vue
<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):

```vue
<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 no `app.use()` plugin; register globally yourself if needed (`app.component('UseMouse', UseMouse)`).
- In `On*` components, pass configuration through the `options` prop and react through the `@trigger` emit, not through handler props (dist/index.js:15-16, 66-68).
- On element-wrapper components, set `as` to change the rendered element, e.g. `as="section"` (dist/index.js:11). Exception: `UseScreenSafeArea` types declare `as` but its runtime props array omits it, so it always renders a `div` (dist/index.js:1096-1101 vs dist/index.d.ts:548-553).
- `UseIdle` requires the `timeout` prop (dist/index.d.ts:297-299).
- `UseVirtualList` requires `list` and `options` props; `height` defaults to `300px`; it exposes `scrollTo(index)` via template ref (dist/index.d.ts:590-610, dist/index.js:1190-1206).
- `UseObjectUrl` renders its slot only after the object URL exists; slot prop is the URL string (dist/index.js:906-915).
- `UseOffsetPagination` emits `page-change`, `page-size-change`, `page-count-change` with the full pagination state (dist/index.js:918-951).
- `UsePointer` accepts `target="window"` (default) or `target="self"` (dist/index.d.ts:463-465, dist/index.js:976-984).
- Do not use the deprecated exports `VOnClickOutside` and `VOnLongPress`; they alias `vOnClickOutside` / `vOnLongPress` (dist/index.d.ts:17-18, 43-44).
- Directive binding values: a handler function, or a `[handler, options]` tuple; `vElementSize` takes `[handler, initialSize, options]` and `vScrollLock` takes a boolean. Details and modifiers: [references/directives.md](./references/directives.md).

## References

- [references/components.md](./references/components.md) — catalog of all 46 components: props, slot data shapes, emits, rendered element
- [references/directives.md](./references/directives.md) — all 14 directives: binding value forms, modifiers, handler payloads
- [references/migration.md](./references/migration.md) — version-specific changes v13 to v15 with official release URLs

Official documentation: https://vueuse.org/guide/components

© skilld-dev · MIT · skilld-dev/vue-ecosystem-skills

Похожие скиллы

Все скиллы по теме «Фронтенд и UI» →
vueuse-functions SerKo Скилл vueuse-functions подбирает функции VueUse для задач во Vue.js и Nuxt и помогает применять их вместо собственного кода. Подходит для Vue 3+ и Nuxt 3+. CX Codex +1 4 100установок vueuse-mcp kovoor Даёт агенту доступ к документации VueUse: он сам ищет композаблы и читает их описания, пока вы пишете код. CX Codex +1 ★ 5звёзд репо antdv-next Antdv Next team Помогает находить документацию компонентов Antdv Next для Vue 3, их props, events и slots. Срабатывает при поиске примеров, API компонентов и определений токенов темы. CX Codex +1 1 500установок components patterns.dev Скилл components для Claude Code помогает собирать Vue-интерфейсы из однофайловых компонентов, связывая шаблон, логику и стили. Помогает структурировать экран и повторно использовать его части. CX Codex +1 212установок dynamic-components patterns.dev Скилл dynamic-components для Claude Code переключает компоненты Vue через <component :is> и сохраняет их состояние с <KeepAlive>. Переключает вкладки и панели без роутера. CX Codex +1 198установок

Из того же набора32

Весь набор →
vee-validate-skilld Скилл vee-validate-skilld помогает писать, проверять и отлаживать формы Vue 3 с vee-validate 4.15.x. Даёт актуальные примеры Composition API, паттерны схем валидации, интеграцию typed-schema и решение типичных ошибок. CX Codex +1 188установок primevue-skilld Скилл primevue-skilld помогает писать и обновлять код для PrimeVue v5: настраивать библиотеку, заменять устаревшие API и собирать компоненты из частей. Пригодится в проекте на Vue 3. CX Codex +1 187установок shadcn-vue-skilld Скилл shadcn-vue-skilld для Claude Code, Codex, Cursor и других агентов, покрывающий CLI shadcn-vue 2.8.2 для Vue и Nuxt. Знает точные флаги всех команд — от init до mcp, конфигурацию components.json и правила разрешения имён компонентов. CX Codex +1 174установок vue-test-utils-skilld Скилл vue-test-utils-skilld помогает писать, отлаживать и проверять тесты Vue 3 с @vue/test-utils 2.5.1. CX Codex +1 168установок motion-v-skilld Скилл motion-v-skilld для анимаций через motion-v (Motion для Vue) — компонент motion, жесты, варианты, директива v-motion, Nuxt-модуль. CX Codex +1 146установок reka-ui-skilld Скилл reka-ui-skilld для Claude Code помогает собирать доступные интерфейсы на Reka UI 2.10.5 во Vue 3, писать чистую композицию и не путать пропсы. CX Codex +1 146установок vueuse-integrations-skilld Скилл vueuse-integrations-skilld учит ИИ-агента правильно использовать 12 обёрток библиотеки @vueuse/integrations v15. Помогает писать типизированный код без ошибок в импортах и сигнатурах. CX Codex +1 145установок tanstack-vue-table-skilld Скилл tanstack-vue-table-skilld обучает агента правилам @tanstack/vue-table v9: явной регистрации фич в tableFeatures, атомарному состоянию и миграции с v8. Пригодится при сборке headless-таблиц на Vue 3. CX Codex +1 144установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой