🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@commercetools-uikit/link

Package Overview
Dependencies
Maintainers
3
Versions
954
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-uikit/link

Links are used either to link to other UI routes, or to link to external pages. This component is a very thin wrapper over either a React Router Link, or a normal HTML tag.

20.2.2
latest
Source
npm
Version published
Weekly downloads
6.4K
0.6%
Maintainers
3
Weekly downloads
 
Created
Source

Description

Links are used either to link to other UI routes, or to link to external pages. This component is a very thin wrapper over either a React Router Link, or a normal HTML <a> tag.

Installation

yarn add @commercetools-uikit/link
npm --save install @commercetools-uikit/link

Additionally install the peer dependencies (if not present)

yarn add react react-intl react-router-dom
npm --save install react react-intl react-router-dom

Usage

import Link from '@commercetools-uikit/link';

const Example = () => <Link to={'/foo/bar'}>Go to foo bar</Link>;
const ExampleWithExternal = () => (
  <Link isExternal={true} to={'https://kanyetothe.com'}>
    Go to external link
  </Link>
);

export default Example;

Properties

PropsTypeRequiredDefaultDescription
childrenReactNodeValue of the link.
Required if intlMessage is not provided.
intlMessageMessageDescriptorAn intl message object that will be rendered with FormattedMessage.
Required if children is not provided.
isExternalbooleanfalseA flag to indicate if the Link points to an external source. If true, a regular <a> is rendered instead of the default react-routers <Link />
tounion
Possible values:
string , LocationDescriptor
The URL that the Link should point to.
toneunion
Possible values:
'primary' , 'inverted', 'secondary'
'primary'Color of the link
onClickFunction
See signature.
Handler when the link is clicked.

Signatures

Signature onClick

(
  event: MouseEvent<HTMLLinkElement> | KeyboardEvent<HTMLLinkElement>
) => void

Keywords

javascript

FAQs

Package last updated on 08 Jul 2025

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