alepha@docs:~/framework/docs/reference/react-hooks$
cat useOverlay.md | pretty
1 min read
Last commit:

#useOverlay

#Import

typescript
1import { useOverlay } from "alepha/react/router";

#Overview

The overlay on screen, and the way out of it.

close goes back through history, so Forward reopens the overlay and the page behind it is neither remounted nor scrolled.

#Examples

tsx
1const { close } = useOverlay();2return <Sheet open onOpenChange={(open) => !open && close()} />;