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.


onCtaClick: () => void

Callback when user clicks the primary CTA.

void


onDismiss: () => void

Callback when user dismisses the placement.

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.