Skip to content
Back to search

solid-floating-ui

MarketplaceWorks with Claude CodeGitHub

Recipes for building floating elements in SolidJS with solid-floating-ui.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/lxsmnsyc/solid-floating-ui with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/lxsmnsyc/solid-floating-ui'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lxsmnsyc--solid-floating-ui/badge.svg)](/listings/lxsmnsyc--solid-floating-ui)

HTML

<a href="/listings/lxsmnsyc--solid-floating-ui"><img src="/api/listings/lxsmnsyc--solid-floating-ui/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npm install --save @floating-ui/dom solid-floating-ui
yarn add @floating-ui/dom solid-floating-ui
pnpm add @floating-ui/dom solid-floating-ui

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 17 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "solid-floating-ui",
  4. "description": "Recipes for building floating elements in SolidJS with solid-floating-ui.",
  5. "owner": {
  6. "name": "Alexis Munsayac",
  7. "url": "https://github.com/lxsmnsyc"
  8. },
  9. "plugins": [
  10. {
  11. "name": "solid-floating-ui",
  12. "description": "Working recipes for tooltips, popovers, dialogs, selects, menus and more, built on solid-floating-ui.",
  13. "source": "./plugins/solid-floating-ui",
  14. "category": "development"
  15. }
  16. ]
  17. }
README.md · README · 225 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # solid-floating-ui
  2. > SolidJS bindings for [Floating UI](https://floating-ui.com/), covering the same surface as [`@floating-ui/react`](https://floating-ui.com/docs/react).
  3. [![NPM](https://img.shields.io/npm/v/solid-floating-ui.svg)](https://www.npmjs.com/package/solid-floating-ui)
  4. ## Install
  5. ```bash
  6. npm install --save @floating-ui/dom solid-floating-ui
  7. ```
  8. ```bash
  9. yarn add @floating-ui/dom solid-floating-ui
  10. ```
  11. ```bash
  12. pnpm add @floating-ui/dom solid-floating-ui
  13. ```
  14. Requirements: `solid-js` and `@solidjs/web` 2.0 or newer, and `@floating-ui/dom`. For
  15. Solid 1.x, use the previous major (1.x) of this package, maintained on the
  16. [`solid-1`](https://github.com/lxsmnsyc/solid-floating-ui/tree/solid-1) branch.
  17. ## Usage
  18. `useFloating` positions a floating element against a reference element and
  19. returns the context every interaction hook and floating component needs.
  20. ```jsx
  21. import { createSignal, Show } from 'solid-js';
  22. import {
  23. autoUpdate,
  24. flip,
  25. offset,
  26. shift,
  27. useClick,
  28. useDismiss,
  29. useFloating,
  30. useInteractions,
  31. useRole,
  32. } from 'solid-floating-ui';
  33. function App() {
  34. const [open, setOpen] = createSignal(false);
  35. const floating = useFloating({
  36. get open() {
  37. return open();
  38. },
  39. onOpenChange: (value) => {
  40. setOpen(value);
  41. },
  42. placement: 'bottom-start',
  43. middleware: [offset(8), flip(), shift()],
  44. whileElementsMounted: autoUpdate,
  45. });
  46. const interactions = useInteractions([
  47. useClick(floating.context),
  48. useDismiss(floating.context),
  49. useRole(floating.context, { role: 'dialog' }),
  50. ]);
  51. return (
  52. <>
  53. <button
  54. {...interactions.getReferenceProps()}
  55. ref={(element) => floating.refs.setReference(element)}
  56. >
  57. Toggle
  58. </button>
  59. <Show when={open()}>
  60. <div
  61. {...interactions.getFloatingProps()}
  62. ref={(element) => floating.refs.setFloating(element)}
  63. style={floating.floatingStyles}
  64. >
  65. Floating content
  66. </div>
  67. </Show>
  68. </>
  69. );
  70. }
  71. ```
  72. ### Options are read reactively
  73. Every hook takes a plain options object whose properties are read lazily, the
  74. way SolidJS reads component props. Pass a getter for anything that changes:
  75. ```jsx
  76. useHover(floating.context, {
  77. get enabled() {
  78. return enabled();
  79. },
  80. delay: { open: 200, close: 100 },
  81. });
  82. ```
  83. The same holds for what the hooks return. `floating.placement`,
  84. `floating.floatingStyles` and `floating.context.open` are live reads, so using
  85. them inside JSX keeps the markup up to date without any extra wiring.
  86. ### Documentation
  87. Run `pnpm dev` for the [playground](examples/playground), an app
  88. with a demo of every hook and component.
  89. The [`docs/`](docs/) directory covers the whole surface:
  90. - [Getting started](docs/getting-started.md)
  91. - [Reactivity](docs/reactivity.md)
  92. - [Positioning](docs/positioning.md)
  93. - [Interactions](docs/interactions.md)
  94. - [Components](docs/components.md)
  95. - [Transitions](docs/transitions.md)
  96. - [Utilities](docs/utilities.md)
  97. - [Recipes](docs/recipes.md)
  98. - [Migrating from `@floating-ui/react`](docs/migrating-from-react.md)
  99. ### Claude Code plugin
  100. [`plugins/solid-floating-ui`](plugins/solid-floating-ui) is a Claude Code
  101. plugin for building these patterns:
  102. ```
  103. /plugin marketplace add lxsmnsyc/solid-floating-ui
  104. /plugin install solid-floating-ui@solid-floating-ui
  105. ```
  106. It adds one skill, `solid-floating-ui`, which loads on its own whenever the work
  107. involves anchored or overlay UI in a SolidJS project. The skill carries the
  108. reactivity rules that decide whether the result updates at all, plus a complete
  109. working recipe for each pattern: tooltip, popover, dialog, select, nested menus,
  110. context menu, cursor tracking, composite, transitions, delay groups and the
  111. arrow.
  112. Two commands come with it:
  113. - `/floating-ui-recipe <name>` scaffolds one of those patterns into the current
  114. project, matching the conventions already in the codebase.
  115. - `/floating-ui-audit [path]` reviews existing usage for the mistakes that
  116. type-check and render but silently stop updating.
  117. ### What is included
  118. Positioning:
  119. - `useFloating`, `usePosition`, `useFloatingRootContext`
  120. - The middleware re-exported from `@floating-ui/dom`, plus an `arrow` that
  121. accepts an accessor
  122. Interactions, composed through `useInteractions`:
  123. - `useClick`, `useClientPoint`, `useDismiss`, `useFocus`, `useHover`,
  124. `useListNavigation`, `useRole`, `useTypeahead`
  125. - `safePolygon` for `useHover`
  126. Components:
  127. - `FloatingArrow`, `FloatingFocusManager`, `FloatingList` with `useListItem`,
  128. `FloatingOverlay`, `FloatingPortal`, `FloatingTree` with `FloatingNode`
  129. - `FloatingDelayGroup` and the experimental `NextFloatingDelayGroup`
  130. - `Composite` and `CompositeItem`
  131. Utilities:
  132. - `useMergeRefs`, `useTransitionStatus`, `useTransitionStyles`
  133. - `solid-floating-ui/utils` for the DOM helpers Floating UI exposes
  134. ### Differences from `@floating-ui/react`
  135. - Options and returned values are reactive getters, read where they are used,
  136. rather than values captured on render.
  137. - There are no ref containers. Anything the library reads from you is an
  138. accessor, such as `items` or the `arrow` element, and anything it produces
  139. arrives through a callback, such as `FloatingList`'s `onElementsChange`.
  140. - `Composite` and `CompositeItem` take a `render` callback only.
  141. - Prop getters produce SolidJS event names, so focus is handled through
  142. `onFocusIn` and `onFocusOut`.
  143. ### Updating the position
  144. `useFloating` recomputes the position when the elements or the positioning
  145. options change. Pass `autoUpdate` as `whileElementsMounted` to keep the
  146. floating element anchored while scrolling and resizing:
  147. ```js
  148. useFloating({
  149. whileElementsMounted: (reference, floating, update) =>
  150. autoUpdate(reference, floating, update, { animationFrame: true }),
  151. });
  152. ```
  153. You can also recompute at will:
  154. ```js
  155. const floating = useFloating();
  156. floating.update();
  157. ```
  158. ### Virtual elements
  159. See [Virtual Elements](https://floating-ui.com/docs/virtual-elements) for
  160. details. Pass one through `refs.setPositionReference`:
  161. ```js
  162. const floating = useFloating();
  163. floating.refs.setPositionReference({
  164. getBoundingClientRect() {
  165. return {/* ... */};
  166. },
  167. });
  168. ```
  169. ## Sponsors
  170. ![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)
  171. ## License
  172. MIT © [lxsmnsyc](https://github.com/lxsmnsyc)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.