eds-link

Explore the Interactive Component

Use the playground below to experiment with the component. Click the button to view the full Storybook deployment for additional examples and configurations.

eds-link Open in Storybook

See It in Use with Code

Check out this practical implementation of component.

In Plain HTML

In React

Overview

EdsLink is a versatile link component offering different styles and behaviors.

Key Features:

  • Customizable visual styles with options for various intents (e.g., primary, secondary, ghost, etc.) and sizes.
  • Supports icons, including positioning for small icons alongside text labels.
  • Configurable for internal and external links, with options for download and disabled states.
  • Sends a Matomo analytics event (via sendAnalytics()) on click; no DOM event is emitted.

This component is designed for flexible navigation and styling, making it suitable for a range of UI needs.

Properties

PropertyAttributeDescriptionTypeDefault
ariaLabelaria-labelThe aria-label for accessibility.stringundefined
currentcurrentIndicates whether the link is the current/active one. Defaults to false.booleanfalse
disableddisabledIndicates if the link is disabled. If true, the link will be rendered as a span. Defaults to false.booleanfalse
downloaddownloadIf true, the link will initiate a file download. Defaults to false.booleanfalse
externalexternalIndicates whether the link points to an external URL. Defaults to false.booleanfalse
hideLabelOnSmallScreenhide-label-on-small-screenIf true, the label will be hidden on smaller screens.booleanfalse
iconiconThe icon name to be displayed alongside the label."copy" | "arrow-right" | "chevron-right" | "chevron-left" | "chevron-down" | "chevron-up" | "arrow-left" | "arrow-up-right" | "close" | "subtract" | "add" | "branch" | "history" | "locked" | "unlocked" | "edit" | "checkmark" | "download" | "upload" | "view" | "exit" | "caretSort" | "bookmark" | "createLink" | "activity" | "account" | "analytics" | "template" | "documentExport" | "documentDownload" | "trashCan" | "chooseItem" | "copyLink" | "dragHorizontal" | "dragVertical" | "login" | "logout" | "move" | "replicate" | "sortAscending" | "sortDescending" | "requestQuote" | "reset" | "resultDraft" | "share" | "play" | "book" | "chatOff" | "forum" | "shareKnowledge" | "time" | "help" | "customerService" | "code" | "rocket" | "compass" | "sparkle" | "menu" | "search" | "settings" | "notification" | "user" | "group" | "building" | "overflow" | "save" | "document" | "folder" | "image" | "calendar" | "information" | "warning" | "error" | "checkmark-filled" | "star" | "thumbs-up" | "thumbs-down" | "star-outline" | "thumbs-up-outline" | "thumbs-down-outline" | "twitter" | "linkedin" | "facebook" | "youtube" | "mastodon" | "bluesky" | "gitlab"undefined
iconPosicon-posThe icon position to be displayed alongside the label - left or right."left" | "right"'right'
iconSmallicon-smallSpecifies if the icon is small. Defaults to false.booleanfalse
intentintentThe visual style intent of the link. Options: ‘primary’, ‘secondary’, ‘secondaryInverse’, ‘ghost’, ‘strong’, ‘weak’, ‘inverse’, ‘underline’, ‘underlineInverse’, ‘brand’, ‘brandInverse’, ‘cta’, ‘cta-brand’."brand" | "brandInverse" | "cta" | "cta-brand" | "ghost" | "inverse" | "primary" | "secondary" | "secondaryInverse" | "strong" | "underline" | "underlineInverse" | "weak"'primary'
labellabelThe text label for the link.stringundefined
pillpillA boolean to determine if the link should have a pill shape (rounded-full). Default is false.booleanfalse
sizesizeThe size of the link. Options are ’tiny’, ‘xsmall’, ‘small’ or ’large’. ‘xsmall’ sets the label to f-ui-03 (14px) and ’tiny’ to f-ui-04 (12px), for dense, inline uses such as a figure value beside a stat. At these two sizes the ‘strong’/‘weak’/‘inverse’ text intents drop their vertical box so the label baseline-aligns with adjacent plain text."large" | "small" | "tiny" | "xsmall"'small'
urlurlThe URL the link points to.stringundefined

Dependencies

Used by

Depends on

Graph

graph TD;
  eds-link --> eds-icon-wrapper
  correct-use-of-colors --> eds-link
  eds-alert --> eds-link
  eds-breadcrumb --> eds-link
  eds-card-app --> eds-link
  eds-card-cta --> eds-link
  eds-card-feature --> eds-link
  eds-cookies-preference --> eds-link
  eds-frame --> eds-link
  eds-fullscreen-menu --> eds-link
  eds-header --> eds-link
  eds-input-footer --> eds-link
  eds-kg-learning-resources --> eds-link
  style eds-link fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS