You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want it to float on top of the UI though, so it doesn’t disrupt the flow of the document. Add this class to all floating elements. Note that Floating UI does not have opinions about how your elements stack on the z-axis.
19
+
20
+
```css
21
+
.floating {
22
+
width: max-content;
23
+
position: absolute;
24
+
top: 0;
25
+
left: 0;
26
+
}
27
+
28
+
```
29
+
30
+
### The Basics
31
+
16
32
Import the desired hook or component from floating-ui-svelte. [View each example](https://floating-ui-svelte.vercel.app/) for additional guidance.
17
33
18
34
```js
@@ -38,8 +54,8 @@ The `useFloating` Svelte hook acts as a controller for all other Floating UI Sve
| ref*| Binded element reference. | - | HTMLElement, null |
194
+
| context*| The context object returned from useFloating(). | - | FloatingContext |
195
+
| width | The width of the arrow. |`14`| number |
196
+
| height | The height of the arrow. |`7`| number |
197
+
| tipRadius | The radius (rounding) of the arrow tip. |`0` (sharp) | number |
198
+
| staticOffset | A static offset override of the arrow from the floating element edge. Often desirable if the floating element is smaller than the reference element along the relevant axis and has an edge alignment (`start`/`end`). |`undefined` (use dynamic path) | string, number, null |
199
+
| d | A custom path for the arrow. Useful if you want fancy rounding. The path should be inside a square SVG and placed at the `bottom` of it. The path is designed for the 'bottom' placement, which will be rotated for other placements. |`"black"` (browser default) | string |
200
+
| fill | The color of the arrow. | xxx | string |
201
+
| stroke | The stroke (border) color of the arrow. This must match (or be less than) the floating element’s border width. |`"none"`| string |
202
+
| strokeWidth | The stroke (border) width of the arrow. |`0`| number |
203
+
204
+
#### Utility Classes and Styles
205
+
206
+
Provide artibrary utility classes using the standard attribute.
0 commit comments