Skip to main content

Pages

Pages, although humble, are some of the highest leverage building blocks in CommandBar. They will allow users to teleport around your app.

More simply, you can create a Page for any view in your product to allow users to quickly jump there from different CommandBar experiences.

Set up Pages in the Dashboard

Setting up a page is super-duper easy (idiot-proof?). All you need to do is pop open Dashboard -> Pages and create a new page.

How are Pages used in CommandBar?

Once you've set up a Page, you can re-use it in any CommandBar experience:

  • Spotlight search results
  • HelpHub search results
  • As CTAs in Copilot responses
  • As CTAs in nudges
  • Included within Checklist items

Ok, but what about Pages with dynamic URLs?

Dynamic URLs are URLs that don’t look the same user-to-user. For example, maybe your URLs include a user-specific parameter like an organization ID: the 424242 in /home/424242/settings. CommandBar handles these dynamic URLs through a fancy-sounding topic called "interpolation" (break that out at your next party, we recommend). To interpolate a value, use the double curly brace syntax (like {{this}}), so to handle a dynamic organization ID, you'd use something like /home/{{metadata.org_id}}/settings.

Where did the metada value come from?

Metadata is any dynamic data that can change from user to user or even page to page.

How to make Page navigation snappy:

Modern apps often use something called SPA's to make pages loads feel freaky fast. These work by only loading the data that's different from page to page. If your app is built with an SPA, you'll definitely want to hook CommandBar up to your SPA, so that CommandBar Pages feel freak fast, too.

To do so, you'll share your app's "router" with CommandBar. It requires a developer to set up, but is an easy change that almost always needs to be done just once.