Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/f36-text-link

Package Overview
Dependencies
Maintainers
4
Versions
346
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-text-link

Forma 36: TextLink component

  • 4.75.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
increased by10.77%
Maintainers
4
Weekly downloads
 
Created
Source

TextLink communicates actions and links to URLs.

Import

import { TextLink } from '@contentful/f36-components';
// or
import { TextLink } from '@contentful/f36-text-link';

Examples

As <a>

By default, TextLink renders <a> HTML tag and should be used as an usual link attribute.

Note that if you use TextLink for linking to third party content and use target="_blank" property, it is recommended to set rel="noreferrer noopener".

As <button>

TextLink can also be rendered as button HTML tag. You can use TextLink this way only when the action have lower priority compared to actions that are accessible via a Button.

There are a number of variations of TextLink styles, here is a guide for when to use them:

  • Primary - Used for primary actions
  • Positive - Used for a positive actions, such as creating or publishing a new entity.
  • Negative - Used for destructive actions - when something can't be undone. For example, deleting entities.
  • Secondary - For actions that should be emphasized less than the default primary style.
  • Muted - For actions that should be emphasized less than the secondary style.
  • White - For actions appearing on a dark background.
  • Premium - For actions that correspond to a paid feature.

Props (API reference)

Content guidelines

  • To make TextLink action-oriented, use a verb. For example, "Add field", not "New field"
  • If a TextLink is used to navigate to a new page, clearly communicate what the user will see when they click on the link. For example, “View teams documentation” vs “Learn about teams”. Avoid generic descriptions like "Click here" or "Go to".
  • Don't use the page's URL as the link description unless you have a good reason to do so, such as referencing a site's new address.
  • Use clear and succinct copy. Aim for a few words or a short phrase.
  • If a TextLink is used in a regular text and it's at the end of a sentence, don’t add a period inside TextLink content. Place it after component.
  • If a TextLink is used as an action-oriented element, don’t add period at all, neither in component content nor after.

Accessibility

  • Avoid using extra styling that that make link looks just like regular text.
  • If you use TextLink for linking to third party content and use target="_blank" property, it is recommended to set rel="noreferrer noopener". More details about external links security

FAQs

Package last updated on 12 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc