Skip to content

State Triggers Overview

State Triggers let you change the quick-action chips your widget shows based on the page the user is on. Define a URL pattern, attach a list of chips, and the widget surfaces those chips whenever the user navigates to a matching URL.

Each State Trigger has three parts:

  1. URL pattern — A glob pattern matched against the current page URL (e.g., /settings/billing, /checkout/*).
  2. Chips — The set of quick-action prompts the widget should display when the pattern matches.
  3. Widget — The widget the trigger applies to.

When a user navigates to a page matching the pattern, the widget swaps its default chips for the trigger’s chips. As the user moves to a different page, the widget either applies a different trigger’s chips or falls back to the widget defaults.

  • Page-specific prompts — Show “Why was I charged twice?” on /settings/billing, show “How do I reset my password?” on /account/security.
  • Funnel coaching — On /checkout/*, suggest prompts that address common pre-purchase questions.
  • Feature-area help — On a complex settings page, surface chips that map to the most-asked questions for that surface.

Patterns use a simple glob syntax:

PatternMatches
/settingsOnly the exact /settings page
/settings/*Any page directly under /settings/ (e.g., /settings/profile)
/docs/*/getting-startedAny getting-started page under a docs subsection

The most specific matching trigger wins when multiple patterns overlap.

State Triggers swap chips (short prompts the user can tap). Guides are full video walkthroughs the user can step through. Use State Triggers for short contextual prompts; use Guides for end-to-end task instruction.