Link

A link takes people to a new location in the app or another website.

Installation

Package installation information
Installyarn add @atlaskit/link
SourceBitbucket.org, (opens new window)
npm@atlaskit/link, (opens new window)
Bundleunpkg.com, (opens new window)

Props

analyticsContext

Description

Additional information to be included in the context of Atlaskit analytics events that come from anchor.

Type{ [x: string]: any; }

appearance

Description

The appearance of the link. Defaults to default. A subtle appearance will render the link with a lighter color and no underline in resting state. Use inverse when rendering on bold backgrounds to ensure that the link is easily visible.

Type"default" | "subtle" | "inverse"

children

Description
No description.
Typestring | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal

href

Required
Description

Standard links can be provided as a string, which should be mapped to the underlying router link component.

Alternatively, you can provide an object for advanced link configurations by supplying the expected object type to the generic.

@example

const MyRouterLink = forwardRef(
(
  {
    href,
    children,
    ...rest
  }: RouterLinkComponentProps<{
    href: string;
    replace: boolean;
  }>,
  ref: Ref<HTMLAnchorElement>,
) => { ...
Typestring | RouterLinkConfig

interactionName

Description
Typestring

newWindowLabel

Description

Override the default text to signify that a link opens in a new window. This is appended to the aria-label attribute when the target prop is set to _blank.

Typestring

onClick

Description

Handler called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the 'analytics-next' package documentation for more information.

Type(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent) => void

ref

Description
No description.
Type((instance: HTMLAnchorElement) => void) | React.RefObject<HTMLAnchorElement>

testId

Description

A unique string that appears as data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License