@bimetal/overlay-react-components
v0.42.0
Published
React render layer for the BIMETAL overlay family — Dialog over the canonical overlay controller.
Maintainers
Readme
@bimetal/overlay-react-components
React render layer for the BIMETAL overlay family — currently Dialog, a thin
binding over the canonical @bimetal/overlay-headless controller. Popover / Tooltip /
Menu / Drawer follow on the same core.
import { useOverlayController } from '@bimetal/react';
import { Dialog } from '@bimetal/overlay-react-components';
function Example() {
const [snapshot, controller] = useOverlayController();
return (
<>
<button onClick={() => controller.open()}>Open</button>
<Dialog controller={controller} title="Hello">…content…</Dialog>
</>
);
}The controller owns open/close + the dismiss policy; the component renders the modal DOM,
traps focus (@bimetal/a11y-dom), locks body scroll, and feeds Esc / backdrop / close-button
dismissals back through requestClose. Styles come from @bimetal/overlay-themes (re-exported).
Apache-2.0.
