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}Type Parameters
Section titled “Type Parameters”C extends ResolvedContent = ResolvedContent
Properties
Section titled “Properties”className?
Section titled “className?”
optionalclassName?:string
Custom CSS class name for styling overrides.
content
Section titled “content”content:
C
Resolved content fields with personalization tokens expanded.
exposureRef?
Section titled “exposureRef?”
optionalexposureRef?: (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).
Parameters
Section titled “Parameters”element
Section titled “element”Element | null
Returns
Section titled “Returns”void
onCtaClick
Section titled “onCtaClick”onCtaClick: () =>
void
Callback when user clicks the primary CTA.
Returns
Section titled “Returns”void
onDismiss
Section titled “onDismiss”onDismiss: () =>
void
Callback when user dismisses the placement.
Returns
Section titled “Returns”void
onRemindLater?
Section titled “onRemindLater?”
optionalonRemindLater?: () =>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.
Returns
Section titled “Returns”void
onSecondaryCtaClick?
Section titled “onSecondaryCtaClick?”
optionalonSecondaryCtaClick?: () =>void
Callback when user clicks a secondary CTA.
Returns
Section titled “Returns”void
placement
Section titled “placement”placement:
object
The full placement output from the decision engine.
promotion?
Section titled “promotion?”
optionalpromotion?:object
Optional promotion data.
style?
Section titled “style?”
optionalstyle?:any
Custom inline styles.
uiPath
Section titled “uiPath”uiPath:
PlacementUiPath
Parsed UI path for CTA handling.
visible
Section titled “visible”visible:
boolean
Whether the placement is currently visible.