floating-ui
Skill33 starsChanged 34 days agoMITView on GitHub
Implement or review floating desktop UI such as dropdowns, popovers, tooltips, menus, comboboxes, and nested overlays under apps/desktop.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Marvellbrazil/my-agentic-skillstheir own version, first seen Oct 17, 2026
- leookun/cursor-byokword for word, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 1
- leookun/cursor-byok★ 3.2k100% same
Edited · 0
None found.
Wrote their own version · 1
- Marvellbrazil/my-agentic-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cursor-prefix-stabilitySkill
- database-schemaSkill
- frontendSkill
- i18nSkill
- model-selectionSkill
- releaseSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 8
Use @floating-ui/dom for every interactive element positioned relative to a trigger.
- Very specific: line 14
Start from the closest existing control in apps/desktop/src/components/ui.
- Very specific: line 16
Use size when reference width or viewport height constrains the overlay.
- Distinctive: line 20
Keep the trigger's open/focus border visible while focus is inside a portaled overlay.
- Distinctive: line 24
Verify placement near all viewport edges, nested-overlay clicks, keyboard dismissal, virtual scrolling, and fixed footer behavior.
≈ “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
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
computePositioninsideautoUpdate; clean up the function returned byautoUpdatewhen the overlay closes or unmounts. - Start from the closest existing control in
apps/desktop/src/components/ui. Match itsplacement,offset,flip,shift, andsizemiddleware 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
sizewhen reference width or viewport height constrains the overlay. Lists that can grow must usecomponents/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 appropriatearia-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.
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.

