Learn about the PageTitle component for displaying page titles in app pages.
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.
import { PageTitle } from "@hubspot/ui-extensions/pages";<PageTitle>Contact Us</PageTitle>
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:
Visual page heading: Renders the main title heading at the top of your page
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.
import React from "react";import { Text, Heading } from "@hubspot/ui-extensions";import { PageBreadcrumbs, PageTitle } from "@hubspot/ui-extensions/pages";const SupportPage = () => { return ( <> <PageBreadcrumbs> <PageBreadcrumbs.PageLink to="/">Home</PageBreadcrumbs.PageLink> <PageBreadcrumbs.Current>Support</PageBreadcrumbs.Current> </PageBreadcrumbs> <PageTitle>Support</PageTitle> <Heading>How can we help?</Heading> <Text>Browse our support resources...</Text> </> );};
Props
Prop
Type
Description
Examples
Simple page title
import { PageTitle } from "@hubspot/ui-extensions/pages";<PageTitle>Documentation</PageTitle>