Text link

v2.1.0

Text links are lightweight navigational elements. Links can appear within a paragraph, after a paragraph, standalone, or in a list of other links. They are underlined by default.

Considerations

Clear

The link text makes it clear where it will take the user.

Identifiable

Links are familiar and easily identifiable amongst other content.

Concise

Link text is short. Aim for fewer than 5 words.

Usage guidelines

When to use

  • Navigating within the app
  • Navigating externally
  • Navigating to an element on a page (anchor link)
  • Email addresses and phone numbers

When not to use

  • Actions that manipulate data or how its displayed
  • Actions that change state

Anatomy

Anatomy of a text link. Number 1 points to the text. Number 2 points to the underline.
  1. Text
  2. Underline

Behavior

Inline

Inline links appear within paragraphs and sentences. They always have an underline to differentiate between non-link content.

A sentence with two links highlighted with underlines.

Color

Links should generally match the color of the content around it. Standalone links can use a secondary color within a list to avoid overwhelming the UI or a primary color for more emphasis.

Two text blocks in black and gray. Each has a text link that matches the color of the surrounding text.

Size

Text links inherit their size and styling from the content around them.

Three different text blocks in different sizes. The text links in each are the same size and color as the surrounding text.

State

Text links use state layers for interaction states. The available states are enabled, hover, focused, visited, and disabled. Learn more about the state layer color values in Color tokens.

The different states lined up for text links. From left to right are enabled, hover, focused, visited, and disabled.

Platforms

Native

Keep in mind that on native devices, it's common for an entire line of text to be tappable when it contains a link. This is particularly important if multiple links are close together, as it could lead to accidental taps.

A mobile screen with a block of text with three lines. The last line has a text link and a pink shape overlapping the full width of the text line to indicate the line itself is tappable.

Best practices

Change log

VersionDateNotes
2.1.0
Aug, 2024
  • Added state, native platform, and browser window guidance
  • Updated to eBay Evo
2.1.0
Jan, 2023
  • Added visited state spec
2.0.0
Apr, 2022
  • Updated to use fg.primary by default
  • Updated guidelines and examples