Skip to main content
Triggered after one or more properties of a view changes. This event enables post-change logic for property updates.

Event properties

type
string
required
Always 'view:properties:change'.
newViewState
object
required
Object containing only the properties that changed.
newViewState.maximized
boolean
Whether the view is now maximized.

Example

instance.on('view:properties:change', (event, instance) => {
    console.log('View properties changed:', event.newViewState);
    
    if (event.newViewState.maximized) {
        console.log('Chat is now maximized');
        analytics.track('chat_maximized');
    } else if (event.newViewState.maximized === false) {
        console.log('Chat is now restored to normal size');
        analytics.track('chat_restored');
    }
});

Do you need practical examples?

Learn how to apply the features available for embedded chat into your implementation with guidance and examples.