Skip to main content
The widget moves through four states, validated by an internal state machine.
StateMeaning
idleCollapsed floating button (default).
nudgeA contextual nudge is being shown.
engageThe main assistant panel is open.
deep-helpExpanded, in-depth help flow.

Allowed transitions

transitionTo enforces the transitions below. An illegal transition throws a StateTransitionError.
FromAllowed targets
idlenudge, engage, deep-help
nudgeidle, engage, deep-help
engageidle, deep-help
deep-helpidle, engage
// Valid — idle allows engage
widget.transitionTo('engage');

// Invalid — engage does not allow nudge, throws StateTransitionError
widget.transitionTo('nudge');
Subscribe to state changes through the stateChange event or the onStateChange hook. See Events and hooks.