MessageSurfaceSlot
constMessageSurfaceSlot:any
Message surface slot — renders push-style notifications, modals, and toasts.
Evaluates placement decisions based on configured triggers and renders the result as a notification, pop-up modal, or toast. The placement only appears when the decision engine returns a match for the current user context.
For on_event triggering, use the forwarded ref:
Example
Section titled “Example”// Mount-triggered notification (evaluates once on mount)<MessageSurfaceSlot id="trial-welcome" />
// Event-triggered gate modalconst ref = useRef<MessageSurfaceSlotRef>(null);<MessageSurfaceSlot id="export-nudge" trigger="on_event" ref={ref} /><button onClick={() => ref.current?.triggerEvent()}>Export</button>
// Interval-polled notification<MessageSurfaceSlot id="global-messages" trigger="on_interval" intervalMs={30_000}/>