Visual Studio Code Link

March 8, 2023 · View on GitHub

The vscode-link is a web component implementation of an anchor element.

Link hero

Usage

❌ Don't✅ Do
Link used for a refresh actionLink used to navigate
Don't use a link for actions or commands. Try a button instead.Use a link to navigate to another location in a project or on the web.
❌ Don't✅ Do
Link with text that fails to convey its purposeLink with clear language that conveys its purpose
Avoid vague link text.Use descriptive language that provides context to what is being linked. Use inline links with text that provides additional information.

Implementation

Interactive component examples

Attributes

AttributeTypeDescription
downloadbooleanPrompts the user to save the linked URL instead of navigating to it.
hrefstringThe URL that the hyperlink points to.
hreflangstringHints at the human language of the linked URL.
pingstringSee MDN.
referrerpolicystringSee MDN.
relstringSee MDN.
targetstringSee MDN.
typestringSee MDN.
<vscode-link href="#">Link Text</vscode-link>
<p>An <vscode-link href="#">inline link</vscode-link> that is a part of a sentence.</p>