@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.
29 lines (28 loc) • 800 B
TypeScript
import * as React from 'react';
/**
* A portal element that moves the popup to a different part of the DOM.
* By default, the portal element is appended to `<body>`.
*
* Documentation: https://base-ui.com
*/
declare function Portal(props: Portal.Props): React.JSX.Element | null;
declare namespace Portal {
var propTypes: any;
}
declare namespace Portal {
interface Props {
children?: React.ReactNode;
/**
* A parent element to render the portal into.
*/
container?: HTMLElement | null | React.RefObject<HTMLElement | null>;
/**
* Whether to keep the portal mounted in the DOM while the popup is hidden.
* @default false
*/
keepMounted?: boolean;
}
interface State {
}
}
export { Portal };