# Link
UI guidelines on using links.
**Implementation:** [`ActionLink`](%gh-ic%/platform/platform-api/src/com/intellij/ui/components/ActionLink.kt), [`DropDownLink`](%gh-ic%/platform/platform-api/src/com/intellij/ui/components/DropDownLink.kt)
{width=706}
## When to use
### Navigation inside a window
Use a regular link for navigation between pages of the same window. In the example bellow Manage scopes… opens another page in Settings for editing the values.
Correct
|
Incorrect
|
### Web resources
Use an external link for navigation to web resources. See below for the [external link icon](#external-link-icon).
{width=706}
### Secondary actions in packed UI areas
Use a regular or [drop-down link](#drop-down-link) for secondary actions in packed or small UI areas.
{width=706}
### Secondary actions in a tree or table
#### Some items can be changed
Use a link as a secondary action for some items of a tree or table.
{width=706}
#### All items can be changed
If a link in every tree or table line has meaningful formatting, leave it.
For example, links in the Push Commits window help understand the relation between them: [remote repository] : [branch]; moving these links elsewhere would break this meaning.
## When not to use
### Primary actions
Use a [button](button.topic) or a [drop down list](drop_down.md) for primary actions. These controls can be selected from the keyboard and are bigger and easier to click.
Correct
|
Incorrect
|
### Secondary actions in a tree or table {id="secondary-actions-not-to-use"}
#### Editable items
When all items can be changed, add an icon button to a toolbar.
Correct
|
Incorrect
|
#### List of choices
For a list of choices, add a separate table column of drop-down cells (see Table).
Correct
|
Incorrect
|
### Simple UI
Use a [button](button.topic) or a [drop down list](drop_down.md) when a UI is not constrained.
These controls can be selected from the keyboard and are bigger and easier to click.
Correct
|
Incorrect
|
## How to use
### Writing guidelines
#### Use sentence capitalization
Follow the [sentence capilaziation](capitalization.md#sentence) guideline.
Correct
|
Incorrect
|
#### Ellipsis
Add an ellipsis to a link if it opens another UI area where input is possible. See examples for the [Button](button.topic).
Correct
|
Incorrect
|
#### Wording
Do not use words like navigate
or click here
. A link already implies navigation or clicking.
Correct
|
Incorrect
|
Correct
|
Incorrect
|
#### Make it informative
When possible, replace Learn more
and other generic phrases with more informative ones.
Correct
|
Incorrect
|
### Link as a part of text
A link can be a part of a checkbox or radio button label or of any stand-alone text, like the text in an [empty state](empty_state.md) or in [context help](context_help.md):
{width=706}
Make a link the minimum phrase that is enough to understand what will happen without reading the whole text:
Correct
|
Incorrect
|
### External link icon
Add the arrow icon for an external link. The icon shows that the user will switch to a browser and lose the current context.
{width=706}
```kotlin
val externalLink = ActionLink("External link") {
BrowserUtil.browse("https://www.jetbrains.com")
}.apply {
setExternalLinkIcon()
}
```
```java
ActionLink externalLink = new ActionLink(
"External link",
event -> BrowserUtil.browse("https://www.jetbrains.com")
);
externalLink.setExternalLinkIcon();
```
### Help icon
Use the help icon in links in [empty states](empty_state.md) to indicate that this is an external help resource. The arrow icon in this case is unnecessary.
Correct
|
Incorrect
|
### Drop-down link
Drop-down links show a context menu or a popup. To implement, use [`DropDownLink`](%gh-ic%/platform/platform-api/src/com/intellij/ui/components/DropDownLink.kt).
{width=706}
## Placement
* For default links follow [layout of buttons and links](layout.md#buttons-and-links).
* For drop-down links follow [layout of labeled controls](layout.md#labeled-input-controls).
## Built-in behavior
A focused link is activated from the keyboard with Space.