Docs/Popout

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

PropTypeDescriptionDefault
idstringUnique key for persistence tracking—
openbooleanControls visibilityfalse
onOpenChange(open: boolean) => voidCallback when open state changes—
animation"fade" | "zoom" | "bounce"Open/close animation"zoom"
lockScrollbooleanLock body scroll while openfalse
closeOnOverlaybooleanClose on overlay clicktrue

Demos

Newsletter Subscription

An email capture modal with botanical imagery, a clean email input, and a strong subscribe CTA. Triggered automatically after 4 seconds.

Flash Sale

A high-energy sales modal with a pinkish spotted background, giant deep-red sale text, and a bold black CTA. Grabs attention instantly.

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...