Learn about the PageLink component for navigating between pages in your app.
The PageLink component is used to create clickable links that navigate to other pages within your app. Use PageLink for internal page navigation and the standard Link component for external URLs.
import { PageLink } from "@hubspot/ui-extensions/pages";// Basic link to another page<PageLink to="/docs">Documentation</PageLink>// Link with parameters<PageLink to="/contacts" params={{ filter: "active" }}> Active Contacts</PageLink>
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.
Use the right component for your navigation needs:
Component
Use for
Import from
PageLink
Internal navigation to pages within your app
@hubspot/ui-extensions/pages
Link
External URLs outside your app
@hubspot/ui-extensions
import { Link } from "@hubspot/ui-extensions";import { PageLink } from "@hubspot/ui-extensions/pages";// Internal navigation - use PageLink<PageLink to="/docs">Documentation</PageLink>// External URL - use Link<Link href="https://www.example.com">External Site</Link>