diff --git a/packages/kumo-docs-astro/src/pages/installation.mdx b/packages/kumo-docs-astro/src/pages/installation.mdx index 12473f206..0b2a640ef 100644 --- a/packages/kumo-docs-astro/src/pages/installation.mdx +++ b/packages/kumo-docs-astro/src/pages/installation.mdx @@ -142,6 +142,36 @@ import "@cloudflare/kumo/styles/standalone"; The standalone build includes all Tailwind utilities and Kumo component styles pre-compiled. No Tailwind configuration needed! +## Isolate Your App Root + +Kumo's floating components (`Select`, `Combobox`, `Dropdown`, `Popover`, `Tooltip`, `Dialog`, and others) render their popups in a portal at the end of `document.body`. Because Kumo doesn't apply a `z-index` to these popups, any positive `z-index` in your own layout (a sticky header, for example) can paint above an open popup. + +To prevent this, add `isolation: isolate` to your application's root element, as [Base UI recommends](https://base-ui.com/react/overview/quick-start#portals): + +```css +/* The element that wraps your entire app, e.g. #root or #app */ +.root { + isolation: isolate; +} +``` + +Or with Tailwind: + +```tsx +