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