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.

  • Skin
  • CoreUI
  • React

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

Content

Use words that describe where the link leads and what content is expected.

Two text strings with text links. The first is the full link “Learn about coupons”. The second is the string “Visit our Grow your business with eBay page.” with a hyperlink on “Grow your business with eBay”.

Don’t use ambiguous words like “click here” or “learn more”. They lack necessary context for screen reader users.

Two text strings. The first simply has the text link “Click here” and the second has the text link “Learn more”.

Underline

Always underline links within or right after paragraphs. Only remove the underline where the context is clear, like a list of links in a footer.

A text block with the text links that have underlines.

Don’t remove the underline for links near other content. This can easily get lost and are inaccessible to low-sight users.

A text block with the text links that don’t have underlines making them invisible.

Size

Do use the same type size as the surrounding text.

A text block with a text link that is the same size as the body text.

Don’t mix type sizes.

A text block with a text link that is a size larger than the body text.

Titles

Use links in body copy or footnotes.

A title and sub copy. The sub copy has a text link.

Don’t use links for titles or headlines.

A title and sub copy. The title has a text link.

Browser window

Do open links in the same browser window.

A text link opening in the same browser tab/window.

Don’t force links to open in a new window. This is a poor experience because it takes control away from the user and forces web-browsing behavior upon them.

A text link opening in a new browser tab/window.

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