Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Link

Navigation links with consistent tone and emphasis.

Preview

Live preview

Changes apply to this preview only.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Enumerated from linkVariantMap: primary, muted and inherit.

Open preview

Enumerated from linkVariantMap: hover, always and none.

Open preview

external adds target and rel plus the arrow; disabled removes href and blocks the click handler.

Open preview

Usage

Use Link for a destination and Button for a command; preserve href and normal browser link behavior.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluLinkProps

Type source
PimoluLinkProps public API
NameTypeDefaultDescription
variant"primary" | "muted" | "inherit" | undefined"primary"Colour treatment. Defaults to "primary".
underline"none" | "hover" | "always" | undefined"hover"When the underline appears. Defaults to "hover".
externalboolean | undefinedfalseOpen in a new tab and add `rel="noopener noreferrer"` unless overridden. Also adds a small external icon by default.
showExternalIconboolean | undefinedtrueHide the external icon while keeping the new-tab attributes.
disabledboolean | undefinedfalsePrevent navigation and remove the href.
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
typestring | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onChangeChangeEventHandler<HTMLAnchorElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLAnchorElement> | undefined—Standard React/HTML attribute.
variant

"primary" | "muted" | "inherit" | undefined

Default: "primary"

Colour treatment. Defaults to "primary".

underline

"none" | "hover" | "always" | undefined

Default: "hover"

When the underline appears. Defaults to "hover".

external

boolean | undefined

Default: false

Open in a new tab and add `rel="noopener noreferrer"` unless overridden. Also adds a small external icon by default.

showExternalIcon

boolean | undefined

Default: true

Hide the external icon while keeping the new-tab attributes.

disabled

boolean | undefined

Default: false

Prevent navigation and remove the href.

childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

type

string | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onChange

ChangeEventHandler<HTMLAnchorElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLAnchorElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Write meaningful link text and explain external destinations when needed without relying on an icon alone.
Read the accessibility guide →