Learn about the PageBreadcrumbs component for breadcrumb navigation in app pages.
The PageBreadcrumbs component is used to display breadcrumb navigation at the top of your page, helping users understand their current location in your app’s hierarchy and navigate back to parent pages.
To use this component, you’ll need to be on version 0.13.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.
The PageBreadcrumbs component should be placed at the top of your page component, before the PageTitle. It typically contains a combination of PageBreadcrumbs.PageLink components (for navigable breadcrumbs) and a PageBreadcrumbs.Current component (for the current page).
import { Text } from "@hubspot/ui-extensions";import { PageBreadcrumbs, PageTitle } from "@hubspot/ui-extensions/pages";const ContactDetailsPage = () => { return ( <> <PageBreadcrumbs> <PageBreadcrumbs.PageLink to="/">Home</PageBreadcrumbs.PageLink> <PageBreadcrumbs.PageLink to="/contacts">Contacts</PageBreadcrumbs.PageLink> <PageBreadcrumbs.Current>Contact Details</PageBreadcrumbs.Current> </PageBreadcrumbs> <PageTitle>Contact Details</PageTitle> <Text>Contact information goes here...</Text> </> );};