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
| 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 | — |
| position | "left" | "right" | Which edge to slide in from | "left" |
| animation | "fade" | "slide" | "bounce" | Animation style | "slide" |
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...