Link
A basic link component to allow linking to different pages from your Add-on.
Component render
<Link
href="https://developer.squareup.com"
onClick={() => console.log("link clicked!")}
target="_blank"
>
Text link
</Link>
Properties
Property | Type | Description |
---|---|---|
children | string | The link text to display. |
destructive | boolean | Gives the link destructive styling. |
disabled | boolean | Visually disables the link and prevents navigating to the link on click. |
download | string | Causes the browser to treat the linked URL as a download. Only works for same-origin URLs. Only applies when an href is provided. See here for details on accepted values. |
href | string | String that represents the URL the link goes to. If not present, the internal tag will be a <button> rather than <a> in order to align with a11y best practices. |
onClick | () => void | A callback that runs when the link is clicked. You cannot prevent the link behavior from occurring in this callback. |
rel | string | Defines the relationship between a linked resource and the current document. Only applies when an href is provided. See here for details on accepted values. |
target | "_blank" "_self" "_parent" "_top" | Specifies where to open the linked URL. See here for details on accepted values. |