Popout
A smooth animated modal that centres on screen. Supports timer, scroll, inactivity, and exit-intent triggers out of the box.
$import { Popout } from react-marketing-popups
Props
| Prop | Type | Description | Default |
|---|---|---|---|
| id | string | Unique key for persistence tracking | — |
| open | boolean | Controls visibility | false |
| onOpenChange | (open: boolean) => void | Callback when open state changes | — |
| animation | "fade" | "zoom" | "bounce" | Open/close animation | "zoom" |
| lockScroll | boolean | Lock body scroll while open | false |
| closeOnOverlay | boolean | Close on overlay click | true |
Demos
Code Examples
By design the open state is handled outside of the component
Core
Use the Popout directly — manage open state with useState and wire it to onOpenChange.
Loading...Trigger hooks
Use hooks for automatic triggering. Pass onOpenChange to wire the hook to your open state. Each hook also returns [fired, setFired] if you need to track whether it has fired.
Loading...