Skip to content

PlacementSlotProps

Props passed to every placement slot renderer.

The generic parameter C allows custom slot types to narrow the content field to a specific shape, eliminating unknown casts:

interface MyContent extends ResolvedContent {
modal_type: string;
benefits: Array<{ text: string }>;
}
function MySlot(props: PlacementSlotProps<MyContent>) {
props.content.modal_type; // string — no cast needed
}

C extends ResolvedContent = ResolvedContent

optional className?: string

Custom CSS class name for styling overrides.


content: C

Resolved content fields with personalization tokens expanded.


optional exposureRef?: (element) => void

Optional exposure ref (plan 144 TASK-9 / REQ-18). Attach it to the slot’s true visual root so RevTurbine can observe when the placement actually enters the viewport for viewport-qualified exposure; when IntersectionObserver is unavailable it falls back to render (exposure_basis: 'render_fallback'). Additive and optional — omitting it changes nothing, and it never requires a wrapper element (REQ-18/REQ-19).

Element | null

void


onCtaClick: () => void

Callback when user clicks the primary CTA.

void


onDismiss: () => void

Callback when user dismisses the placement.

void


optional onRemindLater?: () => void

Optional callback when the user chooses “Remind me later” (defer). When provided, dismissible slots render a defer control beside dismiss; the placement re-queues and reappears after the remind-later window (remind_later_minutes, default 60) rather than the longer dismiss cooldown (plan 167 REQ-7). Additive and optional — omit it and slots render exactly as before, with no defer control.

void


optional onSecondaryCtaClick?: () => void

Callback when user clicks a secondary CTA.

void


placement: object

The full placement output from the decision engine.


optional promotion?: object

Optional promotion data.


optional style?: any

Custom inline styles.


uiPath: PlacementUiPath

Parsed UI path for CTA handling.


visible: boolean

Whether the placement is currently visible.