Docs/Slide In

Slide In

A fixed panel that slides in from the left or right edge. Perfect for discount codes, urgency offers, and contextual nudges.

$import { SlideIn } from react-marketing-popups

Props

PropTypeDescriptionDefault
idstringUnique key for persistence tracking—
openbooleanControls visibilityfalse
onOpenChange(open: boolean) => voidCallback when open state changes—
position"left" | "right"Which edge to slide in from"left"
animation"fade" | "slide" | "bounce"Animation style"slide"

Discount Offer — from Left

A clean white panel sliding in from the left with a prominent coupon code, feature perks, and an amber gradient CTA button.

Almost Gone Offer — from Right

An urgency panel sliding from the right with a navy header, gold luxury product showcase with two premium bottles, and a bold CTA.

Code Examples

By design the open state is handled outside of the component

Core

Use the SlideIn 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...