diff --git a/docs-app/app/templates/5-floaty-bits/floating-ui.gjs.md b/docs-app/app/templates/5-floaty-bits/floating-ui.gjs.md index ff3f898e3..76d603831 100644 --- a/docs-app/app/templates/5-floaty-bits/floating-ui.gjs.md +++ b/docs-app/app/templates/5-floaty-bits/floating-ui.gjs.md @@ -1,13 +1,19 @@ # Floating UI -The `FloatingUI` component provides a wrapper for using [Floating UI](https://floating-ui.com/), for associating a floating element to an anchor element (such as for menus, popovers, etc). - -The usage of a 3rd-party library will be removed when [CSS Anchor Positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_anchor_positioning) lands and is widely supported (This component and modifier will still exist for the purpose of wiring up the ids between anchor and target). +**Higher-level components use CSS Anchor Positioning.** ``, ``, and other built-in components now use native [CSS Anchor Positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_anchor_positioning) instead of Floating UI. For most use cases, prefer [``](/5-floaty-bits/popover.md) or [``](/5-floaty-bits/menu.md) directly. + +The `` component and `anchorTo` modifier remain available for: +- **Environments without CSS Anchor Positioning support** — if you need to support browsers that don't yet implement CSS Anchor Positioning, use `` directly for JS-based positioning +- **Advanced use cases** where you need direct access to [Floating UI](https://floating-ui.com/) middleware + +Note that Floating UI is entirely JS-based and does not use CSS Anchor Positioning internally — these are two separate positioning approaches. +The `FloatingUI` component provides a wrapper for using [Floating UI](https://floating-ui.com/), for associating a floating element to an anchor element (such as for menus, popovers, etc). + Several of Floating UI's functions and [middleware](https://floating-ui.com/docs/middleware) are used to create an experience out of the box that is useful and expected. See Floating UI's [documentation](https://floating-ui.com/docs/getting-started) for more information on any of the following included functionality. diff --git a/docs-app/app/templates/5-floaty-bits/popover.gjs.md b/docs-app/app/templates/5-floaty-bits/popover.gjs.md index 8906b3ced..e0d6e6fbb 100644 --- a/docs-app/app/templates/5-floaty-bits/popover.gjs.md +++ b/docs-app/app/templates/5-floaty-bits/popover.gjs.md @@ -1,12 +1,12 @@ # Popover -Popovers are built with [Floating UI][docs-floating-ui], a set of utilities for making floating elements relate to each other with minimal configuration. The `` component uses the [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) for layering, which totally solves z-index and overflow clipping issues, no portals needed. +Popovers use [CSS Anchor Positioning][docs-anchor] for positioning floating elements relative to their anchor, with automatic flip fallbacks via `position-try-fallbacks` and viewport-aware visibility via `position-visibility`. No JavaScript positioning library needed. + +The `` component uses the [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) for layering, which totally solves z-index and overflow clipping issues — no portals needed. One thing to note is that the position of the popover can _escape_ the boundary of a [ShadowDom][docs-shadow-dom] -- all demos on this docs site for `ember-primitives` use a `ShadowDom` to allow for isolated CSS usage within the demos. -[docs-floating-ui]: /5-floaty-bits/floating-ui.md -[docs-floating]: https://floating-ui.com/ -[docs-popper]: https://popper.js.org/ +[docs-anchor]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_anchor_positioning [docs-shadow-dom]: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM