Use for navigation to other pages or sections. Prefer over q2-btn for non-action navigation.
disabledDetermines whether the component and tctClick event are disabled.
hrefThe link when clicked.
iconTypeicon-typeThe q2-icon to display when variant is set to "standalone".
labelThe displayed label to represent your link.
referrerpolicyHow much of the referrer to send when following the link. See MDN for more information on referrerpolicy.
targetWhere to display the linked URL. See MDN for more information on target.
tctTitletct-titleApplies a title attribute to the anchor tag in the shadowRoot of the component.
variantDetermines the visual display style of the link.
The q2-link element exposes events that can be used to send and receive data from the component based on user interaction.
Emitted when the link is clicked.
{ target: string; referrerpolicy: string; href: string; }If an event handler is bound to the element using:
ontctClick property - The default handler will not fire, and the value must be updated in the custom handler.addEventListener("tctClick") method - The default handler will fire alongside the custom handler.The q2-link element exposes methods that can be used to perform various actions on the component.
A method for click.
clickLink() => Promise<void>This component uses other components in the Tecton library, including:
q2-iconOther components in the Tecton library use this component, including:
q2-file-pickerLinks are navigational elements that can be used on their own or inline with text. They provide a lightweight option for navigation, but like other interactive elements, too many links will clutter a page and make it difficult for users to identify their next steps. This is especially true for inline links, which should be used sparingly.
**Standalone link: **Links that are used on their own or directly following content. These do not use underlines and must be paired with an icon.
Inline Link: Inline links are placed in body copy and are used to indicate reference material.

Use when you want users to:
Link: A link can be used to navigate a user to another page or website, another place on the same page, or to open a link in a new tab. Activating a link changes the URL. It is not intended to be used as a trigger for an action. A button is more appropriate for elements that trigger an action when activated.
Button: This is used to trigger an action on a page or to complete tasks in other components, such as forms and modals. Exception: "Back" and "Next" buttons may be used to navigate a guided experience.
Allow keyboard navigation of links.
Use unique, meaningful link text.
Do not mix the usage of links and buttons, as outlined above
When using the standalone link, the icon should have a proper aria-label
The following CSS variables are available to override the default theme styles of the q2-link component.
Many Tecton components consume other components to maintain visual and functional consistency. If you are looking for a CSS variable you think should exist but are not seeing it, it may be defined in one of the dependent components below. Either way, if you think it's something we should expose more conveniently, let us know!