Visual Studio Code Link
March 8, 2023 · View on GitHub
The vscode-link is a web component implementation of an anchor element.

Usage
| ❌ Don't | ✅ Do |
|---|---|
![]() | ![]() |
| 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 |
|---|---|
![]() | ![]() |
| 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
| Attribute | Type | Description |
|---|---|---|
download | boolean | Prompts the user to save the linked URL instead of navigating to it. |
href | string | The URL that the hyperlink points to. |
hreflang | string | Hints at the human language of the linked URL. |
ping | string | See MDN. |
referrerpolicy | string | See MDN. |
rel | string | See MDN. |
target | string | See MDN. |
type | string | See MDN. |
Basic Link (With Href Attribute)
<vscode-link href="#">Link Text</vscode-link>
Inline Link
<p>An <vscode-link href="#">inline link</vscode-link> that is a part of a sentence.</p>



