Agent skill

Floating UI Overlays

by leookun in leookun/cursor-byok

Rules for building dropdowns, popovers, tooltips and menus in the desktop app with @floating-ui/dom, covering portals, positioning, dismissal and ARIA state.

MITAuto-check passedFrontend & Design

Install Floating UI Overlays

skills CLI
$ npx skills add leookun/cursor-byok --skill floating-ui -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install leookun/cursor-byok floating-ui --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/leookun/cursor-byok.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/floating-ui .claude/skills/floating-ui && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
floating-ui
GitHub stars
3.2k
Token cost
~496 tokens
SKILL.md length
239 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Rules for building dropdowns, popovers, tooltips and menus in the desktop app with @floating-ui/dom, covering portals, positioning, dismissal and ARIA state.

  • Adding a dropdown, popover, tooltip or combobox to the desktop app
  • SKILL.md covers Required structure and Interaction invariants
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Reviewing overlay code for clipping, focus and dismissal bugs

What it does

Every interactive element positioned relative to a trigger must use @floating-ui/dom, never hand-computed coordinates or CSS absolute offsets. Overlays render through createPortal into document.body so layout and stacking contexts cannot clip them, and position comes from computePosition inside autoUpdate, whose cleanup function runs when the overlay closes or unmounts.

New overlays start from the closest existing control under apps/desktop/src/components/ui and reuse its placement, offset, flip, shift and size settings. Computed left, top, width and available height go into React state rather than direct style mutation, and lists that can grow use the shared VirtualList with headers and footers kept outside the virtual viewport.

Interaction rules: keep the trigger's open or focus border visible, close on outside pointer events and Escape and return focus to the trigger, make outside-click checks cover both trigger and overlay, and stop a nested overlay's pointer events from reaching its parent so child menus do not close it. Triggers expose aria-expanded, aria-controls and aria-haspopup. Verification covers viewport edges, nested clicks, keyboard dismissal, virtual scrolling and fixed footers.

When your agent uses it

  • Adding a dropdown, popover, tooltip or combobox to the desktop app
  • Reviewing overlay code for clipping, focus and dismissal bugs
  • Fixing a nested menu that closes its parent when clicked

Example prompts

  • “Add a user menu dropdown to the desktop toolbar using floating-ui, following the existing controls.”
  • “Review the new combobox for outside-click handling and ARIA attributes.”
  • “Make the model picker list virtualized and keep its footer fixed.”

Requirements

  • The apps/desktop React project
  • @floating-ui/dom

What it can do on your machine

Read from SKILL.md and the folder at commit 7ee68c2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Floating UI Overlays loads about 496 tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 239 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~496

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from leookun/cursor-byok at commit 7ee68c2, republished under its MIT licence (© leookun). 239 words, ~496 tokens.

Download SKILL.mdSave it as .claude/skills/floating-ui/SKILL.md (or your agent's skills folder).
name
floating-ui
description
Implement or review floating desktop UI such as dropdowns, popovers, tooltips, menus, comboboxes, and nested overlays under apps/desktop.

Floating UI

Use @floating-ui/dom for every interactive element positioned relative to a trigger. Do not calculate coordinates manually or rely on CSS absolute offsets for dropdowns, popovers, menus, combobox lists, or tooltips.

Required structure

  • Render overlays through createPortal(..., document.body) so layout and stacking contexts do not clip them.
  • Position with computePosition inside autoUpdate; clean up the function returned by autoUpdate when the overlay closes or unmounts.
  • Start from the closest existing control in apps/desktop/src/components/ui. Match its placement, offset, flip, shift, and size middleware unless the interaction requires a deliberate difference.
  • Store computed left, top, width, and available height in React state. Apply the state to the portal root; do not mutate element styles directly.
  • Use size when reference width or viewport height constrains the overlay. Lists that can grow must use components/virtual/VirtualList.tsx; keep fixed headers and footers outside the virtual viewport.

Interaction invariants

  • Keep the trigger's open/focus border visible while focus is inside a portaled overlay.
  • Close on outside pointer interaction and Escape, then return focus to the trigger.
  • Outside-click checks must include both trigger and overlay. A nested portaled overlay must stop its pointer event from reaching the parent's outside-click listener, so interacting with a child menu never closes its parent.
  • Expose trigger state with aria-expanded, aria-controls, and the appropriate aria-haspopup; give the overlay the matching menu, listbox, dialog, or tooltip semantics.
  • Verify placement near all viewport edges, nested-overlay clicks, keyboard dismissal, virtual scrolling, and fixed footer behavior.

© leookun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/floating-ui of leookun/cursor-byok.

Open the folder on GitHubat commit 7ee68c2

Compare with similar skills

Floating UI Overlays next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Floating UI Overlays compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Floating UI Overlays this skillleookun/cursor-byok3.2k—~496Automated safety check: PassMIT
Chakra UI v3 Builderchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT
Connect Component To Figmadequelabs/cauldron129—~2kAutomated safety check: PassMPL-2.0
A11y Auditscaleway/ultraviolet127—~979Automated safety check: PassApache-2.0
Framer Component Best Practicesframer/plugins138—~1.3kAutomated safety check: PassMIT
Stitch to React and Vite Dashboardgoogle-labs-code/stitch-skills8.4k—~914Automated safety check: NotesApache-2.0

Similar skills

  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Connect Component To Figma

    dequelabs/cauldron

    Add a Figma Code Connect (.figma.tsx) file for a Cauldron React component.

    129 GitHub stars~2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • A11y Audit

    scaleway/ultraviolet

    Audit components for accessibility. An agent skill from scaleway/ultraviolet.

    127 GitHub stars~979 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Best practices for building and improving React code components in Framer, a no-code website builder.

    138 GitHub stars~1.3k tokensUpdated 6 days ago
    Frontend & DesignAuto-check passed
  • Stitch to React and Vite Dashboard

    google-labs-code/stitch-skills

    Official

    Turns Stitch screens into a React, Vite and TypeScript dashboard with TanStack Query data fetching, DESIGN.md tokens as CSS variables and optional read-only Web3 data.

    8.4k GitHub stars~914 tokensUpdated 1 mo ago
    Frontend & DesignAuto-check: notes
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    Frontend & DesignAuto-check passed

More from leookun/cursor-byok

  • Cursor BYOK Prefix Stability

    leookun/cursor-byok

    Guides changes to the cursor-byok server so provider conversation history stays append-only and each turn's history remains an exact prefix of the next, protecting prefix caches.

    3.2k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Cursor BYOK Database Schema

    leookun/cursor-byok

    Guides SQLite schema changes in the Cursor BYOK server, keeping SQLx migrations, the Rust store, API contracts and fixtures aligned.

    3.2k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Cursor BYOK Frontend Guide

    leookun/cursor-byok

    Sets the rules for building the Cursor BYOK desktop app's React and Tauri frontend, especially its HTTP boundary and component state architecture.

    3.2k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Model Selection Component

    leookun/cursor-byok

    Standardizes how a desktop app's UI lets a person choose one or more already-configured AI models, through a single grouped dropdown component.

    3.2k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Cursor BYOK Desktop Release

    leookun/cursor-byok

    Guides releases of the Cursor BYOK desktop app on GitHub, with strict rules on who may publish and how version tags, updater manifests and signing are handled.

    3.2k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Desktop i18n for Cursor BYOK

    leookun/cursor-byok

    Rules for localizing the Cursor BYOK desktop app: the global t() function, complete locale catalogs, system-language selection and the scan-and-check commands.

    3.2k GitHub stars~508 tokensUpdated today
    Auto-check passed

Works with

Questions about Floating UI Overlays

What does Floating UI Overlays do?

Rules for building dropdowns, popovers, tooltips and menus in the desktop app with @floating-ui/dom, covering portals, positioning, dismissal and ARIA state. Every interactive element positioned relative to a trigger must use @floating-ui/dom, never hand-computed coordinates or CSS absolute offsets.body so layout and stacking contexts cannot clip them, and position comes from computePosition inside autoUpdate, whose cleanup function runs when the overlay closes or unmounts.

When should I use Floating UI Overlays?

Floating UI Overlays fits situations like: adding a dropdown, popover, tooltip or combobox to the desktop app; reviewing overlay code for clipping, focus and dismissal bugs; fixing a nested menu that closes its parent when clicked.

How do I install Floating UI Overlays in Claude Code?

Run `npx skills add leookun/cursor-byok --skill floating-ui -a claude-code`. Or copy the skill folder (.agents/skills/floating-ui in leookun/cursor-byok) into .claude/skills/floating-ui in your project. Claude Code loads it when a task matches its description.

How do I install Floating UI Overlays in Codex?

Run `npx skills add leookun/cursor-byok --skill floating-ui -a codex`. Or copy the skill folder (.agents/skills/floating-ui in leookun/cursor-byok) into .agents/skills/floating-ui in your project. Codex loads it when a task matches its description.

Can I use Floating UI Overlays in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add leookun/cursor-byok --skill floating-ui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/floating-ui, .gemini/skills/floating-ui, .github/skills/floating-ui and .opencode/skills/floating-ui in your project.

What does Floating UI Overlays need to run?

SKILL.md names no scripts, command-line tools or credentials: Floating UI Overlays is instructions for the agent only. Our summary lists: The apps/desktop React project; @floating-ui/dom.

Does Floating UI Overlays access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Floating UI Overlays safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Floating UI Overlays use?

Floating UI Overlays is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Floating UI Overlays use?

About 496 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Floating UI Overlays?

Skills that share tags, products or a category with Floating UI Overlays: Chakra UI v3 Builder (chakra-ui/chakra-ui, 41k stars), Connect Component To Figma (dequelabs/cauldron, 129 stars), A11y Audit (scaleway/ultraviolet, 127 stars) and Framer Component Best Practices (framer/plugins, 138 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Floating UI Overlays?

leookun (a GitHub user) maintains it in leookun/cursor-byok, which has 3,156 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: leookun/cursor-byok on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.