In This Article
PageLink
A React component that renders an HTML anchor element that leads to a dashboard page.
Props
The PageLink
component accepts the following props:
Name | Type | Description |
---|---|---|
destination | Destination | Destination for the desired link. |
onClick | Function | On click event handler. |
children | React children prop | Link content |
Destination Object
Name | Type | Description |
---|---|---|
pageId | string | ID of the page to link to. Use the Page IDs table to find the appropriate ID. |
relativeUrl | string | Optional. URL segment to append to the base URL of the selected page. Can include path segments, a query string, and a fragment identifier. |
In addition, the component will forward other props to the inline anchor element.
Examples
To set up a dashboard client for React, refer to the setup guide.
Rendering a link to the home page
Copy
1import { withDashboard, PageLink } from '@wix/dashboard-react';2
3export default withDashboard(() => {4 return <PageLink destination={{pageId: 'home'}}>Back home</PageLink>5});
Was this helpful?
Yes
No