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

4.1.0 • Public • Published

@nimbus-ds/link

@nimbus-ds/link

The Link component allows us to navigate between internal or external pages of a website.

Installation

$ yarn add @nimbus-ds/link
# or
$ npm install @nimbus-ds/link

Component Anatomy

The component consists of text, as well as optional icons.

Guidelines

We use this component independently, within other components or within the text. Link currently has 3 variants with different uses, in addition to the possibility of including an icon.

Primary Link

This variant is used to highlight important links for the user's navigation, as it is blue in color and the use of the underline is optional. The repetition of this type of link on the same page is allowed, but not more than once per element.

Neutral Link

This is the variant used for neutral and complementary actions, it can accompany the Primary or Danger variant in cases where we have opposite actions. For example: If the Primary Link is "Save" the Default Link must be "Cancel".

DangerLink

This variant is used to highlight links with destructive action, where the use of the Button Danger component has a visual role beyond what is necessary.

Icons

We use the icons to reinforce the message of the link or to inform that your address is external, they can be applied before or after the text.

Content

The Link text must clearly describe the action by referring to it using colloquial language and addressed directly to the user. For example: we use "Edit categories" and not "Categories".

External links must always be accompanied by an icon that helps to illustrate what will happen when you click on it, with the aim of reinforcing the message and providing more visual resources.

For example, when the link performs a navigation action to an external link, we must use an icon to indicate that the user will be directed to another application or external page.

The exception to this rule is when the Link is within the context of a paragraph or sentence, where we can avoid using the icon to maintain the visual structure of the text block.

Recommendation for use

  • Navigate to another section within the app or website
  • Navigate to another app or external page
  • Perform minor actions

Related component

  • Button - Can be used to initiate actions, make state or page changes that require greater visual prominence.

Polymorphic support

This component can be rendered as a <button> or <link> HTML element, using the as property, which allows it to inherit all native properties of HTML elements for different implementations.

Usage

View docs here.

Nimbus

Readme

Keywords

none

Package Sidebar

Install

npm i @nimbus-ds/link

Weekly Downloads

2

Version

4.1.0

License

MIT

Unpacked Size

25.9 kB

Total Files

5

Last publish

Collaborators

  • nimbus-design-system
  • tiendanube