Skip to content
import { Link } from '@cimpress-ui/react';

Link component can be activated by pressing the Enter key, similar to a native HTML link.

Links rendered within the text component will inherit the style of the surrounding text. Certain styles like color and text decoration will not be inherited, so that links remain visually distinct.

The example below renders two paragraphs of text with nested links. Notice that the links match the style of the containing paragraph, even though the link markup doesn’t change.

Displays a textual link that allows users to navigate to another page or resource.

See link usage guidelines.

Ref<HTMLAnchorElement>

The ref type for this component.

LinkProps
string

A URL to link to.

ReactNode

Text to display. Allows nesting other typography components.

boolean

Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.

string

Sets the CSS className for the element. Only use as a last resort. Use style props instead.

See styling guide.

CSSProperties

Sets the CSS style for the element. Only use as a last resort. Use style props instead.

See styling guide.

string

Defines a string value that labels the current element.

string

Identifies the element (or elements) that labels the current element.

string

Identifies the element (or elements) that describes the object.

string

Identifies the element (or elements) that provide a detailed, extended description for the object.

undefined

Options for the configured client side router.

ReactNode

An icon displayed before the link text.

ReactNode

An icon displayed after the link text.

'small' | 'medium' | 'title-1' | 'title-2' | 'title-3' | 'title-4' | 'title-5' | 'title-6' | 'body' | 'body-semibold' | 'medium-semibold' | 'small-semibold'

Determines the visual variant of text.

'normal' | 'italic'

Whether the font should be styled with a normal or italic face.

'center' | 'end' | 'start' | 'justify'

Horizontal alignment of text.

boolean

Whether the link is disabled.

string

Hints at the human language of the linked URL. SeeMDN.

HTMLAttributeAnchorTarget

The target window for the link. See MDN.

string

The relationship between the linked resource and the current page. See MDN.

string | boolean

Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN.

string

A space-separated list of URLs to ping when the link is followed. See MDN.

HTMLAttributeReferrerPolicy

How much of the referrer to send when following the link. See MDN.

(e: HoverEvent) => void

Handler that is called when a hover interaction starts.

(e: HoverEvent) => void

Handler that is called when a hover interaction ends.

StyleProps
Responsive<Spacing | "auto">

The amount of margin applied to all edges of this component.

Responsive<Spacing | "auto">

The amount of margin applied to the left and right edges of this component. Takes priority over margin.

Responsive<Spacing | "auto">

The amount of margin applied to the top and bottom edges of this component. Takes priority over margin.

Responsive<Spacing | "auto">

The amount of margin applied to the top edge of this component. Takes priority over marginY and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the right edge of this component. Takes priority over marginX and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the bottom edge of this component. Takes priority over marginY and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the left edge of this component. Takes priority over marginX and margin.