MCPInstall

floating-ui-vue-skilld

Floating UI for Vue (@floating-ui/vue@2.0.1). ALWAYS use when writing code importing "@floating-ui/vue" or using useFloating, arrow, floatingStyles, or autoUpdate. Consult for middleware setup, anchoring, virtual elements, and v1 to v2 migration. Vue 3.3+ only.

Installs
119
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/skilld-dev/vue-ecosystem-skills --skill floating-ui-vue-skilld
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads floating-ui-vue-skilld automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

@floating-ui/vue 2.0.1

Vue 3 composable for anchor positioning. useFloating() computes x/y coordinates that place a floating element (tooltip, popover, menu) next to a reference element.

Version limits

  • Vue >=3.3.0 only (peer dependency, package.json:58). v2.0.0 dropped the vue-demi layer, ending Vue 2 and Vue <3.3 support.
  • Vue 2 or Vue <3.3 projects must stay on npm install @floating-ui/vue@1 (https://floating-ui.com/docs/vue).
  • Runtime dependencies: @floating-ui/dom@^1.8.0, @floating-ui/utils@^0.2.12 (package.json:46-49).
  • TypeScript with exactOptionalPropertyTypes: supported since v2.0.1 (optional properties are typed T | undefined, dist/floating-ui.vue.d.ts:198-224).

Quick start

<script setup>
import {ref} from 'vue';
import {useFloating, offset, flip, shift, autoUpdate} from '@floating-ui/vue';

const reference = ref(null);
const floating = ref(null);
const open = ref(false);

const {floatingStyles, isPositioned} = useFloating(reference, floating, {
  open,
  middleware: [offset(10), flip(), shift()],
  whileElementsMounted: autoUpdate,
});
</script>

<template>
  <button ref="reference" @click="open = !open">Button</button>
  <div v-if="open" ref="floating" :style="floatingStyles">Tooltip</div>
</template>

Default placement is bottom; positioning uses transform by default (https://floating-ui.com/docs/vue).

API changes since 1.x

Best practices

  • Pass whileElementsMounted: autoUpdate so the floating element stays anchored during scroll, resize, and layout changes (dist/floating-ui.vue.mjs:146-156; https://floating-ui.com/docs/vue).
  • When wrapping autoUpdate to pass options, always return the cleanup function (dist/floating-ui.vue.mjs:140-145):
useFloating(reference, floating, {
  whileElementsMounted(...args) {
    return autoUpdate(...args, {animationFrame: true});
  },
});
  • Use v-if for the floating element when using whileElementsMounted. With v-show, skip whileElementsMounted and manage autoUpdate manually, or listeners leak on hidden elements (https://floating-ui.com/docs/vue).
  • Pass an open ref and gate side effects on isPositioned; positioning resolves in a microtask, so the element sits at (0, 0) until then. isPositioned stays false while open is false (dist/floating-ui.vue.mjs:137, dist/floating-ui.vue.mjs:157-161):
const {isPositioned} = useFloating(reference, floating, {open});
watch(isPositioned, (positioned) => {
  if (positioned) inputRef.value?.focus();
});
  • Pass refs or getters (() => props.placement) to open, placement, strategy, middleware, transform options for reactivity; they are watched with flush: 'sync' (dist/floating-ui.vue.mjs:162-164).
  • Pass component template refs directly. Components are unwrapped via $el; a component that renders a comment node resolves to null and positioning safely no-ops (dist/floating-ui.vue.mjs:6-15).
  • Keep the default transform: true and animate an inner wrapper element if you need CSS transform animations; the outer positioned node keeps translate() positioning (https://floating-ui.com/docs/vue).
  • Use arrow({element: arrowRef}) with a template ref. It no-ops (returns {}) until the arrow element mounts; read middlewareData.arrow?.x/.y for placement (dist/floating-ui.vue.mjs:27-34).

Common tasks

  • Arrow positioning example and full option defaults: API reference.
  • Upgrading from 1.x or pinning for Vue 2: Migration guide.

Package exports

useFloating, arrow, plus re-exports from @floating-ui/dom: autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size (dist/floating-ui.vue.mjs:2). Import middleware from @floating-ui/vue, not @floating-ui/dom, to keep the Vue-aware arrow behavior.

FAQ

What does the floating-ui-vue-skilld skill do?

Floating UI for Vue (@floating-ui/vue@2.0.1). ALWAYS use when writing code importing "@floating-ui/vue" or using useFloating, arrow, floatingStyles, or autoUpdate. Consult for middleware setup, anchoring, virtual elements, and v1 to v2 migration. Vue 3.3+ only.

How do I install floating-ui-vue-skilld?

Run npx skills add https://github.com/skilld-dev/vue-ecosystem-skills --skill floating-ui-vue-skilld in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/floating-ui-vue-skilld/ (personal) or .claude/skills/floating-ui-vue-skilld/ (project).

Which AI agents can use floating-ui-vue-skilld?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is floating-ui-vue-skilld safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains floating-ui-vue-skilld?

It is published by skilld-dev in skilld-dev/vue-ecosystem-skills. It has 119 recorded installs.

More from skilld-dev/vue-ecosystem-skills

View all →

quasar-skilld

skilld-dev/vue-ecosystem-skills

Build, configure, and debug apps with the Quasar framework (quasar npm package, v2.33.1). Use when writing, reviewing, or debugging code that imports "quasar" or "quasar/wrappers", configuring Quasar with Vite, Vitest, Storybook, UMD, or Quasar CLI, styling with Quasar Sass variables, or upgrading between Quasar v2 releases.

Frontend & Design661 installs

vue-i18n-skilld

skilld-dev/vue-ecosystem-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design401 installs

vue-skilld

skilld-dev/vue-ecosystem-skills

Build, debug, and modernize UI with Vue 3.6. Use when editing .vue files, writing components or composables, or working with code that imports "vue". Covers script setup, reactivity, Vapor Mode, SSR, and version-specific API changes from 3.4 through 3.6.0-beta.17.

Frontend & Design399 installs

vuetify-skilld

skilld-dev/vue-ecosystem-skills

Vue Material Component Framework. Use when writing, debugging, or configuring code that imports vuetify v4.x. Covers createVuetify setup, components and labs, composables, theming, icons, dates and locale, styles and SASS variables, treeshaking, and v3 to v4 migration.

Frontend & Design380 installs

pinia-skilld

skilld-dev/vue-ecosystem-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design313 installs

vue-router-skilld

skilld-dev/vue-ecosystem-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design285 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs