@gemeente-denhaag/link
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

Navigation Link

npm (scoped) GitHub Workflow Status (branch)

Figma Design

Links are used as navigational elements. They may appear on their own, within a sentence or paragraph, or directly following the content.

When to use

Links are used as navigational elements and can be used on their own or inline with text. They provide a lightweight option for navigation but like other interactive elements, too many links will clutter a page and make it difficult for users to identify their next steps. This is especially true for inline links, which should be used sparingly.

Use links when you want users to:

  • Navigate to a different page within the website
  • Navigate to an entirely different site
  • Link to emails or phone numbers

Alternatives and related components

Use Button for actions that don’t appear within or directly following a sentence.

Navigate to Button

Anatomy

The navigation link consists of:

  1. Label: communicates what is being linked to
  2. Icon (optional): this icon gives the label extra guidance

(Interactive) states

The navigation link contains the states normal, hover, disabled and focus.

Design properties

Typography

  • Label: TheSans/md/400

Color

  • Label: text color Blue/3
  • Icon: svg color Blue/3

Interactive states

  • Hover: label text color Blue/4, icon svg color Blue/4
  • Disabled: label text color Grey/2, icon svg color Grey/2
  • Focus: label text color Blue/4, icon svg color Blue/4, border color Ocher/5

Structure

  • Label: padding-top and padding-bottom 8px
  • Icon: height and width 20px
  • Icon-left: padding-right 8px
  • Icon-right: padding-left 8px

Best practices

Buttons versus navigation links

Navigation links are used primarily for navigation, and usually appear within or directly following a sentence.

Buttons are used primarily for actions, such as “Add”, “Close”, “Cancel”, or “Save”. Plain buttons, which look similar to links, are used for less important or less commonly used actions, such as “view settings”.

Do's

Navigation links should:

  • Be placed at the end of sentences where possible
  • Clearly explain where the link will take you to
  • Front-load the most relevant keyword
  • Be understandable out of context

Don'ts

Navigation links should:

  • Never use a button in place of a link
  • Not use vague or generic labels for links
  • Not open internal link in a new tab

References

https://www.interaction-design.org/literature/article/tips-for-better-hyperlink-ux
https://blog.prototypr.io/a-guide-to-designing-perfect-links-in-ux-414558f35730
https://uxplanet.org/dos-and-don-ts-of-web-design-8c9d6a5de7c6
https://www.nngroup.com/articles/writing-links/

Readme

Keywords

none

Package Sidebar

Install

npm i @gemeente-denhaag/link

Weekly Downloads

282

Version

2.1.0

License

EUPL-1.2

Unpacked Size

47.9 kB

Total Files

15

Last publish

Collaborators

  • yolijn
  • mijndenhaag