UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

16 lines (14 loc) 484 B
'use client'; import * as ReactDOM from 'react-dom'; import { useFloatingPortalNode } from "../floating-ui-react/index.js"; /** * `FloatingPortal` includes tabbable logic handling for focus management. * For components that don't need tabbable logic, use `FloatingPortalLite`. * @internal */ export function FloatingPortalLite(props) { const node = useFloatingPortalNode({ root: props.root }); return node && /*#__PURE__*/ReactDOM.createPortal(props.children, node); }