Skip to main content
The PageTitle component is used to display the main title heading on your page and automatically updates the browser tab’s document.title to match. This provides both visual page identification and improved user experience when users have multiple browser tabs open.
To use this component, you’ll need to be on version 0.10.0 or later of the ui-extensions NPM package. You can check your current version by running npm list or npm list -g, and install the latest version by running npm i @hubspot/ui-extensions.

What PageTitle does

The PageTitle component serves two key functions:
  1. Visual page heading: Renders the main title heading at the top of your page
  2. Browser document title: Automatically updates the browser tab’s document.title to match the page title
This dual functionality helps users understand which page they’re viewing, both within your app and when switching between browser tabs.

Basic usage

The PageTitle component should be placed near the top of your page component, immediately after PageBreadcrumbs (if present). It works alongside PageHeader - use PageTitle for the page title and PageHeader for action buttons.

Props

Examples

Simple page title

Title with breadcrumbs

Dynamic page title

Title in a layout component using route IDs

When using a layout component, you can use routeId from usePageRoute() to set the page title based on the active route:

Complete page structure

Here’s a complete example showing how PageTitle works with PageBreadcrumbs and PageHeader:

How document.title works

When you use PageTitle, the browser tab title automatically updates to match:
This is particularly helpful when users have multiple tabs open, as they can easily identify which tab contains which page of your app.

PageTitle vs PageHeader

PageTitle and PageHeader serve different purposes and should be used together:

Guidelines

  • DO: place PageTitle at the top of your page component, immediately after PageBreadcrumbs.
  • DO: keep titles concise and descriptive (typically 1-5 words).
  • DO: use meaningful titles that help users understand the current page.
  • DO: consider how the title appears in browser tabs and bookmarks.
  • DO: include PageTitle on every page in your app.
  • DON’T: use PageTitle for section headings - use Heading components instead.
  • DON’T: include redundant words like “Page” in the title (e.g., use “Settings” not “Settings Page”).
  • DON’T: make titles too long - they get truncated in browser tabs.

Accessibility and user experience

Proper page titles improve both accessibility and user experience:
  • Screen readers: users with screen readers hear the page title when navigating
  • Browser tabs: users can identify pages when switching between tabs
  • Browser history: meaningful titles make it easier to find pages in browser history
  • Bookmarks: descriptive titles create useful bookmark names
  • Navigation: clear titles help users understand where they are in your app
Last modified on April 14, 2026