Add Links to Lightning Pages from Your Custom Components

To link to Lightning Experience pages, use lightning:formattedUrl in your custom component. The lightning:formattedUrl component displays a URL as a hyperlink.

If you use raw anchor tags or the ui:outputUrl (deprecated) component for links, the page does a full reload each time you click the link. To avoid full page reloads, replace your link components with lightning:formattedUrl.

For examples, see the Component Library.

Copy the attributes from the ui:outputUrl component.

Paste the same attributes into the lightning:formattedUrl component. lightning:formattedUrl supports more attributes, like tooltip.

See Also